diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-10 22:34:51 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-10 22:34:51 +0000 |
commit | 80d96fa5cd180d0fdda215f8ed52cfd39ef59423 (patch) | |
tree | 3f6f43b8d76a6d476f29a458b842aedf76d9306e /chrome/renderer/render_thread.cc | |
parent | 26ea6c409fedeabdabb53f41fcc80b79d2575cf9 (diff) | |
download | chromium_src-80d96fa5cd180d0fdda215f8ed52cfd39ef59423.zip chromium_src-80d96fa5cd180d0fdda215f8ed52cfd39ef59423.tar.gz chromium_src-80d96fa5cd180d0fdda215f8ed52cfd39ef59423.tar.bz2 |
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 <chase@chromium.org> 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
Diffstat (limited to 'chrome/renderer/render_thread.cc')
-rw-r--r-- | chrome/renderer/render_thread.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index 3a0e739..2b919ac 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -10,6 +10,7 @@ #include "base/command_line.h" #include "base/shared_memory.h" #include "base/stats_table.h" +#include "chrome/browser/renderer_preferences.h" #include "chrome/common/app_cache/app_cache_context_impl.h" #include "chrome/common/app_cache/app_cache_dispatcher.h" #include "chrome/common/chrome_switches.h" @@ -241,6 +242,7 @@ void RenderThread::OnSetNextPageID(int32 next_page_id) { void RenderThread::OnCreateNewView(gfx::NativeViewId parent_hwnd, ModalDialogEvent modal_dialog_event, + const RendererPreferences& renderer_prefs, const WebPreferences& webkit_prefs, int32 view_id) { EnsureWebKitInitialized(); @@ -256,8 +258,8 @@ void RenderThread::OnCreateNewView(gfx::NativeViewId parent_hwnd, // TODO(darin): once we have a RenderThread per RenderView, this will need to // change to assert that we are not creating more than one view. RenderView::Create( - this, parent_hwnd, waitable_event, MSG_ROUTING_NONE, webkit_prefs, - new SharedRenderViewCounter(0), view_id); + this, parent_hwnd, waitable_event, MSG_ROUTING_NONE, renderer_prefs, + webkit_prefs, new SharedRenderViewCounter(0), view_id); } void RenderThread::OnSetCacheCapacities(size_t min_dead_capacity, |