Do not allow URL drops on app windows to cause a navigation away
from the currently loaded site. We are careful in this patch to
continue to allow dropping URLs in text fields within the app
window, and behavior for normal browser windows remains as
before.
There is a slight glitch when dragging a to an app window on the
border of the window. Even though it is very brief, it is still
disturbing.
BUG=7171
TEST=Open Chrome (1), load google.com. Open Chrome (2), load
yahoo.com. Drag a link from 1 to 2 and a link from 2 to 1 (both
allowed). Create an app shortcut from 1, drag a link from 1 to
2 (allowed) and a link from 2 to 1 (denied). Verify that link
scan be dragged to the omnibox and to text fields.
Patch by Chase Phillips <[email protected]> via
http://codereview.chromium.org/119298
Review URL: http://codereview.chromium.org/121003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18100 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index ad09bf6..297ed288 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1482,6 +1482,13 @@
return save_package_.get(); // May be NULL, but we can return NULL.
}
+RendererPreferences TabContents::GetRendererPrefs() const {
+ if (delegate())
+ return delegate()->GetRendererPrefs();
+ else
+ return RendererPreferences();
+}
+
ExtensionFunctionDispatcher* TabContents::CreateExtensionFunctionDispatcher(
RenderViewHost* render_view_host,
const std::string& extension_id) {