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/common | |
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/common')
-rw-r--r-- | chrome/common/render_messages.h | 16 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 7 |
2 files changed, 22 insertions, 1 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 50749cb..57cdcc8 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -14,6 +14,7 @@ #include "base/ref_counted.h" #include "base/shared_memory.h" #include "chrome/browser/renderer_host/resource_handler.h" +#include "chrome/browser/renderer_preferences.h" #include "chrome/common/filter_policy.h" #include "chrome/common/ipc_message_utils.h" #include "chrome/common/modal_dialog_event.h" @@ -1507,6 +1508,21 @@ struct ParamTraits<ViewHostMsg_DidPrintPage_Params> { } }; +// Traits for RendererPreferences structure to pack/unpack. +template <> +struct ParamTraits<RendererPreferences> { + typedef RendererPreferences param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.can_accept_load_drops); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return ReadParam(m, iter, &p->can_accept_load_drops); + } + static void Log(const param_type& p, std::wstring* l) { + l->append(L"<RendererPreferences>"); + } +}; + // Traits for WebPreferences structure to pack/unpack. template <> struct ParamTraits<WebPreferences> { diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index d6d56bf..7984ebf 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -41,9 +41,10 @@ IPC_BEGIN_MESSAGES(View) // Tells the renderer to create a new view. // This message is slightly different, the view it takes is the view to // create, the message itself is sent as a non-view control message. - IPC_MESSAGE_CONTROL4(ViewMsg_New, + IPC_MESSAGE_CONTROL5(ViewMsg_New, gfx::NativeViewId, /* parent window */ ModalDialogEvent, /* model dialog box event */ + RendererPreferences, WebPreferences, int32 /* view id */) @@ -59,6 +60,10 @@ IPC_BEGIN_MESSAGES(View) IPC_MESSAGE_ROUTED1(ViewMsg_CreatingNew_ACK, gfx::NativeViewId /* parent_hwnd */) + // Sends updated preferences to the renderer. + IPC_MESSAGE_ROUTED1(ViewMsg_SetRendererPrefs, + RendererPreferences) + // Tells the render view to close. IPC_MESSAGE_ROUTED0(ViewMsg_Close) |