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

Side by Side Diff: chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc

Issue 9382037: Move ContextMenuParams struct from webkit/glue to content/public/common. The reasons are: (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 years, 10 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
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/ui/views/tab_contents/render_view_context_menu_views.h" 5 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" 10 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
11 #include "content/browser/renderer_host/render_widget_host_view.h" 11 #include "content/browser/renderer_host/render_widget_host_view.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 #include "content/public/browser/web_contents_view.h" 13 #include "content/public/browser/web_contents_view.h"
14 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
15 #include "ui/base/accelerators/accelerator.h" 15 #include "ui/base/accelerators/accelerator.h"
16 #include "ui/base/keycodes/keyboard_codes.h" 16 #include "ui/base/keycodes/keyboard_codes.h"
17 #include "ui/views/controls/menu/menu_item_view.h" 17 #include "ui/views/controls/menu/menu_item_view.h"
18 #include "ui/views/controls/menu/menu_model_adapter.h" 18 #include "ui/views/controls/menu/menu_model_adapter.h"
19 #include "ui/views/controls/menu/menu_runner.h" 19 #include "ui/views/controls/menu/menu_runner.h"
20 20
21 using content::WebContents; 21 using content::WebContents;
22 22
23 //////////////////////////////////////////////////////////////////////////////// 23 ////////////////////////////////////////////////////////////////////////////////
24 // RenderViewContextMenuViews, public: 24 // RenderViewContextMenuViews, public:
25 25
26 RenderViewContextMenuViews::RenderViewContextMenuViews( 26 RenderViewContextMenuViews::RenderViewContextMenuViews(
27 WebContents* web_contents, 27 WebContents* web_contents,
28 const ContextMenuParams& params) 28 const content::ContextMenuParams& params)
29 : RenderViewContextMenu(web_contents, params), 29 : RenderViewContextMenu(web_contents, params),
30 menu_(NULL) { 30 menu_(NULL) {
31 } 31 }
32 32
33 RenderViewContextMenuViews::~RenderViewContextMenuViews() { 33 RenderViewContextMenuViews::~RenderViewContextMenuViews() {
34 } 34 }
35 35
36 void RenderViewContextMenuViews::RunMenuAt(int x, int y) { 36 void RenderViewContextMenuViews::RunMenuAt(int x, int y) {
37 TabContentsViewViews* tab = 37 TabContentsViewViews* tab =
38 static_cast<TabContentsViewViews*>(source_web_contents_->GetView()); 38 static_cast<TabContentsViewViews*>(source_web_contents_->GetView());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 item->SetEnabled(enabled); 115 item->SetEnabled(enabled);
116 item->SetTitle(title); 116 item->SetTitle(title);
117 item->SetVisible(!hidden); 117 item->SetVisible(!hidden);
118 118
119 views::MenuItemView* parent = item->GetParentMenuItem(); 119 views::MenuItemView* parent = item->GetParentMenuItem();
120 if (!parent) 120 if (!parent)
121 return; 121 return;
122 122
123 parent->ChildrenChanged(); 123 parent->ChildrenChanged();
124 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698