Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 11896047: Move the methods in disposition_utils.h and event_disposition.h to ui\base\window_open_disposition.… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix regex in ui.gyp Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/event_disposition.cc ('k') | chrome/browser/ui/app_list/search_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/tab_contents/render_view_context_menu.h" 5 #include "chrome/browser/tab_contents/render_view_context_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 using extensions::MenuManager; 112 using extensions::MenuManager;
113 113
114 namespace { 114 namespace {
115 115
116 // Usually a new tab is expected where this function is used, 116 // Usually a new tab is expected where this function is used,
117 // however users should be able to open a tab in background 117 // however users should be able to open a tab in background
118 // or in a new window. 118 // or in a new window.
119 WindowOpenDisposition ForceNewTabDispositionFromEventFlags( 119 WindowOpenDisposition ForceNewTabDispositionFromEventFlags(
120 int event_flags) { 120 int event_flags) {
121 WindowOpenDisposition disposition = 121 WindowOpenDisposition disposition =
122 chrome::DispositionFromEventFlags(event_flags); 122 ui::DispositionFromEventFlags(event_flags);
123 return disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition; 123 return disposition == CURRENT_TAB ? NEW_FOREGROUND_TAB : disposition;
124 } 124 }
125 125
126 bool IsCustomItemEnabled(const std::vector<WebMenuItem>& items, int id) { 126 bool IsCustomItemEnabled(const std::vector<WebMenuItem>& items, int id) {
127 DCHECK(id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST && 127 DCHECK(id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST &&
128 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST); 128 id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST);
129 for (size_t i = 0; i < items.size(); ++i) { 129 for (size_t i = 0; i < items.size(); ++i) {
130 int action_id = IDC_CONTENT_CONTEXT_CUSTOM_FIRST + items[i].action; 130 int action_id = IDC_CONTENT_CONTEXT_CUSTOM_FIRST + items[i].action;
131 if (action_id == id) 131 if (action_id == id)
132 return items[i].enabled; 132 return items[i].enabled;
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 source_web_contents_->GetRenderViewHost()-> 1855 source_web_contents_->GetRenderViewHost()->
1856 ExecuteMediaPlayerActionAtLocation(location, action); 1856 ExecuteMediaPlayerActionAtLocation(location, action);
1857 } 1857 }
1858 1858
1859 void RenderViewContextMenu::PluginActionAt( 1859 void RenderViewContextMenu::PluginActionAt(
1860 const gfx::Point& location, 1860 const gfx::Point& location,
1861 const WebPluginAction& action) { 1861 const WebPluginAction& action) {
1862 source_web_contents_->GetRenderViewHost()-> 1862 source_web_contents_->GetRenderViewHost()->
1863 ExecutePluginActionAtLocation(location, action); 1863 ExecutePluginActionAtLocation(location, action);
1864 } 1864 }
OLDNEW
« no previous file with comments | « chrome/browser/event_disposition.cc ('k') | chrome/browser/ui/app_list/search_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698