diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 19:16:02 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 19:16:02 +0000 |
commit | ea192e83450c3391f03c59219dfc9797e912a0d1 (patch) | |
tree | 1a3b36e00cce783a135c2f0edc463eb58ce3e6bd /webkit/glue | |
parent | dc1e688dc600bd425ad6be0a923c0a6c1d53b6c9 (diff) | |
download | chromium_src-ea192e83450c3391f03c59219dfc9797e912a0d1.zip chromium_src-ea192e83450c3391f03c59219dfc9797e912a0d1.tar.gz chromium_src-ea192e83450c3391f03c59219dfc9797e912a0d1.tar.bz2 |
Fix the issue that context menu doesn't show on fullscreen Pepper Flash.
- generate WebInputEvent::ContextMenu events.
- calculate the context menu position correctly.
- monitor mouse down events on fullscreen render widget, so that we can pass correct timestamp to gtk_menu_popup.
BUG=None.
TEST=Open a fullscreen Youtube video, and right click on it to see whether context menu shows up or not.
Review URL: http://codereview.chromium.org/6760019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81135 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/context_menu.cc | 7 | ||||
-rw-r--r-- | webkit/glue/context_menu.h | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/webkit/glue/context_menu.cc b/webkit/glue/context_menu.cc index b4f479c..317130e 100644 --- a/webkit/glue/context_menu.cc +++ b/webkit/glue/context_menu.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,9 +7,12 @@ namespace webkit_glue { +const int32 CustomContextMenuContext::kCurrentRenderWidget = kint32max; + CustomContextMenuContext::CustomContextMenuContext() : is_pepper_menu(false), - request_id(0) { + request_id(0), + render_widget_id(kCurrentRenderWidget) { } } // namespace webkit_glue diff --git a/webkit/glue/context_menu.h b/webkit/glue/context_menu.h index 45a91e8..e8441e56 100644 --- a/webkit/glue/context_menu.h +++ b/webkit/glue/context_menu.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -19,6 +19,11 @@ namespace webkit_glue { struct CustomContextMenuContext { bool is_pepper_menu; int request_id; + // The routing ID of the render widget on which the context menu is shown. + // It could also be |kCurrentRenderWidget|, which means the render widget that + // the corresponding ViewHostMsg_ContextMenu is sent to. + int32 render_widget_id; + static const int32 kCurrentRenderWidget; CustomContextMenuContext(); }; |