summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-21 22:53:03 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-21 22:53:03 +0000
commita14ddcdd5bb4f7b221275872d5cf4e9233bab7f4 (patch)
treef12d7d58fd83974ceebf4b4c53bdfc52599d211b /content
parent35a323d21fa7f89c9339f89003b87609a4d81bcc (diff)
downloadchromium_src-a14ddcdd5bb4f7b221275872d5cf4e9233bab7f4.zip
chromium_src-a14ddcdd5bb4f7b221275872d5cf4e9233bab7f4.tar.gz
chromium_src-a14ddcdd5bb4f7b221275872d5cf4e9233bab7f4.tar.bz2
Replace content::ContextMenuSourceType with ui::MenuSourceType.
BUG=239110 Review URL: https://chromiumcodereview.appspot.com/17432002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207946 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/render_view_host_delegate.h1
-rw-r--r--content/browser/renderer_host/render_view_host_impl.cc1
-rw-r--r--content/common/view_messages.h4
-rw-r--r--content/content_common.gypi1
-rw-r--r--content/port/browser/render_view_host_delegate_view.h1
-rw-r--r--content/public/browser/web_contents_view_delegate.h1
-rw-r--r--content/public/common/context_menu_params.h4
-rw-r--r--content/public/common/context_menu_source_type.h22
-rw-r--r--content/renderer/render_view_impl.cc12
-rw-r--r--content/renderer/render_view_impl.h4
-rw-r--r--content/shell/shell_web_contents_view_delegate.h1
11 files changed, 12 insertions, 40 deletions
diff --git a/content/browser/renderer_host/render_view_host_delegate.h b/content/browser/renderer_host/render_view_host_delegate.h
index 15c3439..6a07f5e 100644
--- a/content/browser/renderer_host/render_view_host_delegate.h
+++ b/content/browser/renderer_host/render_view_host_delegate.h
@@ -13,7 +13,6 @@
#include "base/process_util.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
-#include "content/public/common/context_menu_source_type.h"
#include "content/public/common/javascript_message_type.h"
#include "content/public/common/media_stream_request.h"
#include "net/base/load_states.h"
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 4c5456b..83729af 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -57,7 +57,6 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h"
-#include "content/public/common/context_menu_source_type.h"
#include "content/public/common/result_codes.h"
#include "content/public/common/url_constants.h"
#include "content/public/common/url_utils.h"
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 1a7508b..fc26803 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -21,7 +21,6 @@
#include "content/port/common/input_event_ack_state.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/context_menu_params.h"
-#include "content/public/common/context_menu_source_type.h"
#include "content/public/common/favicon_url.h"
#include "content/public/common/file_chooser_params.h"
#include "content/public/common/frame_navigate_params.h"
@@ -51,6 +50,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/base/range/range.h"
+#include "ui/base/ui_base_types.h"
#include "ui/gfx/point.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_f.h"
@@ -78,7 +78,6 @@ IPC_ENUM_TRAITS(WebKit::WebPopupType)
IPC_ENUM_TRAITS(WebKit::WebTextDirection)
IPC_ENUM_TRAITS(WebMenuItem::Type)
IPC_ENUM_TRAITS(WindowContainerType)
-IPC_ENUM_TRAITS(content::ContextMenuSourceType)
IPC_ENUM_TRAITS(content::FaviconURL::IconType)
IPC_ENUM_TRAITS(content::FileChooserParams::Mode)
IPC_ENUM_TRAITS(content::JavaScriptMessageType)
@@ -90,6 +89,7 @@ IPC_ENUM_TRAITS(content::StopFindAction)
IPC_ENUM_TRAITS(content::ThreeDAPIType)
IPC_ENUM_TRAITS(media::ChannelLayout)
IPC_ENUM_TRAITS(media::MediaLogEvent::Type)
+IPC_ENUM_TRAITS(ui::MenuSourceType)
IPC_ENUM_TRAITS(ui::TextInputType)
#if defined(OS_MACOSX)
diff --git a/content/content_common.gypi b/content/content_common.gypi
index aed28a4..29b6e07 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -37,7 +37,6 @@
'public/common/content_switches.h',
'public/common/context_menu_params.cc',
'public/common/context_menu_params.h',
- 'public/common/context_menu_source_type.h',
'public/common/console_message_level.h',
'public/common/favicon_url.cc',
'public/common/favicon_url.h',
diff --git a/content/port/browser/render_view_host_delegate_view.h b/content/port/browser/render_view_host_delegate_view.h
index 4460544..8b7b953 100644
--- a/content/port/browser/render_view_host_delegate_view.h
+++ b/content/port/browser/render_view_host_delegate_view.h
@@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "content/common/content_export.h"
#include "content/common/drag_event_source_info.h"
-#include "content/public/common/context_menu_source_type.h"
#include "third_party/WebKit/public/web/WebDragOperation.h"
class SkBitmap;
diff --git a/content/public/browser/web_contents_view_delegate.h b/content/public/browser/web_contents_view_delegate.h
index 3975503..0e61017 100644
--- a/content/public/browser/web_contents_view_delegate.h
+++ b/content/public/browser/web_contents_view_delegate.h
@@ -12,7 +12,6 @@
#endif
#include "content/common/content_export.h"
-#include "content/public/common/context_menu_source_type.h"
#include "ui/gfx/native_widget_types.h"
#if defined(OS_MACOSX)
diff --git a/content/public/common/context_menu_params.h b/content/public/common/context_menu_params.h
index d43f160..5940c37 100644
--- a/content/public/common/context_menu_params.h
+++ b/content/public/common/context_menu_params.h
@@ -10,12 +10,12 @@
#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "content/common/content_export.h"
-#include "content/public/common/context_menu_source_type.h"
#include "content/public/common/page_state.h"
#include "content/public/common/ssl_status.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/public/web/WebContextMenuData.h"
#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
+#include "ui/base/ui_base_types.h"
#include "webkit/common/webmenuitem.h"
#if defined(OS_ANDROID)
@@ -146,7 +146,7 @@ struct CONTENT_EXPORT ContextMenuParams {
CustomContextMenuContext custom_context;
std::vector<WebMenuItem> custom_items;
- ContextMenuSourceType source_type;
+ ui::MenuSourceType source_type;
#if defined(OS_ANDROID)
// Points representing the coordinates in the document space of the start and
diff --git a/content/public/common/context_menu_source_type.h b/content/public/common/context_menu_source_type.h
deleted file mode 100644
index 53e6a60..0000000
--- a/content/public/common/context_menu_source_type.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef CONTENT_PUBLIC_COMMON_CONTEXT_MENU_SOURCE_TYPE_H_
-#define CONTENT_PUBLIC_COMMON_CONTEXT_MENU_SOURCE_TYPE_H_
-
-namespace content {
-
-enum ContextMenuSourceType {
- CONTEXT_MENU_SOURCE_MOUSE,
- CONTEXT_MENU_SOURCE_KEYBOARD,
- CONTEXT_MENU_SOURCE_TOUCH,
-
- // This source type is used when the context menu is summoned by pressing the
- // context menu button in the touch editing menu.
- CONTEXT_MENU_SOURCE_TOUCH_EDIT_MENU,
-};
-
-} // namespace content
-
-#endif // CONTENT_PUBLIC_COMMON_CONTEXT_MENU_SOURCE_TYPE_H_
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 1ce5a36..2a2ac75 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -805,7 +805,7 @@ RenderViewImpl::RenderViewImpl(RenderViewImplParams* params)
handling_select_range_(false),
next_snapshot_id_(0),
allow_partial_swap_(params->allow_partial_swap),
- context_menu_source_type_(content::CONTEXT_MENU_SOURCE_MOUSE) {
+ context_menu_source_type_(ui::MENU_SOURCE_MOUSE) {
}
void RenderViewImpl::Initialize(RenderViewImplParams* params) {
@@ -2452,7 +2452,7 @@ void RenderViewImpl::showContextMenu(
WebFrame* frame, const WebContextMenuData& data) {
ContextMenuParams params = ContextMenuParamsBuilder::Build(data);
params.source_type = context_menu_source_type_;
- if (context_menu_source_type_ == CONTEXT_MENU_SOURCE_TOUCH_EDIT_MENU) {
+ if (context_menu_source_type_ == ui::MENU_SOURCE_TOUCH_EDIT_MENU) {
params.x = touch_editing_context_menu_location_.x();
params.y = touch_editing_context_menu_location_.y();
}
@@ -5951,7 +5951,7 @@ void RenderViewImpl::DidHandleKeyEvent() {
}
bool RenderViewImpl::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
- context_menu_source_type_ = CONTEXT_MENU_SOURCE_MOUSE;
+ context_menu_source_type_ = ui::MENU_SOURCE_MOUSE;
possible_drag_event_info_.event_source =
ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE;
possible_drag_event_info_.event_location =
@@ -5964,13 +5964,13 @@ bool RenderViewImpl::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) {
}
bool RenderViewImpl::WillHandleKeyEvent(const WebKit::WebKeyboardEvent& event) {
- context_menu_source_type_ = CONTEXT_MENU_SOURCE_KEYBOARD;
+ context_menu_source_type_ = ui::MENU_SOURCE_KEYBOARD;
return false;
}
bool RenderViewImpl::WillHandleGestureEvent(
const WebKit::WebGestureEvent& event) {
- context_menu_source_type_ = CONTEXT_MENU_SOURCE_TOUCH;
+ context_menu_source_type_ = ui::MENU_SOURCE_TOUCH;
possible_drag_event_info_.event_source =
ui::DragDropTypes::DRAG_EVENT_SOURCE_TOUCH;
possible_drag_event_info_.event_location =
@@ -6607,7 +6607,7 @@ void RenderViewImpl::OnContextMenuClosed(
}
void RenderViewImpl::OnShowContextMenu(const gfx::Point& location) {
- context_menu_source_type_ = CONTEXT_MENU_SOURCE_TOUCH_EDIT_MENU;
+ context_menu_source_type_ = ui::MENU_SOURCE_TOUCH_EDIT_MENU;
touch_editing_context_menu_location_ = location;
if (webview())
webview()->showContextMenu();
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index f49862d..b10b8be 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -27,7 +27,6 @@
#include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
#include "content/common/navigation_gesture.h"
#include "content/common/view_message_enums.h"
-#include "content/public/common/context_menu_source_type.h"
#include "content/public/common/javascript_message_type.h"
#include "content/public/common/page_zoom.h"
#include "content/public/common/referrer.h"
@@ -56,6 +55,7 @@
#include "third_party/WebKit/public/web/WebPageVisibilityState.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
#include "third_party/WebKit/public/web/WebViewClient.h"
+#include "ui/base/ui_base_types.h"
#include "ui/surface/transport_dib.h"
#include "webkit/common/webpreferences.h"
#include "webkit/plugins/npapi/webplugin_page_delegate.h"
@@ -1562,7 +1562,7 @@ class CONTENT_EXPORT RenderViewImpl
scoped_ptr<RenderViewPepperHelper> pepper_helper_;
scoped_ptr<StatsCollectionObserver> stats_collection_observer_;
- ContextMenuSourceType context_menu_source_type_;
+ ui::MenuSourceType context_menu_source_type_;
gfx::Point touch_editing_context_menu_location_;
// ---------------------------------------------------------------------------
diff --git a/content/shell/shell_web_contents_view_delegate.h b/content/shell/shell_web_contents_view_delegate.h
index 715a64d..f9292a8 100644
--- a/content/shell/shell_web_contents_view_delegate.h
+++ b/content/shell/shell_web_contents_view_delegate.h
@@ -8,7 +8,6 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view_delegate.h"
#include "content/public/common/context_menu_params.h"
-#include "content/public/common/context_menu_source_type.h"
#if defined(TOOLKIT_GTK)
#include "ui/base/gtk/gtk_signal.h"