OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/tab_contents/tab_contents.h" | 12 #include "content/browser/tab_contents/tab_contents.h" |
13 #include "content/browser/tab_contents/tab_contents_view.h" | 13 #include "content/browser/tab_contents/tab_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/keycodes/keyboard_codes.h" | 16 #include "ui/base/keycodes/keyboard_codes.h" |
16 #include "ui/base/models/accelerator.h" | |
17 #include "views/controls/menu/menu_item_view.h" | 17 #include "views/controls/menu/menu_item_view.h" |
18 #include "views/controls/menu/menu_model_adapter.h" | 18 #include "views/controls/menu/menu_model_adapter.h" |
19 #include "views/controls/menu/menu_runner.h" | 19 #include "views/controls/menu/menu_runner.h" |
20 | 20 |
21 //////////////////////////////////////////////////////////////////////////////// | 21 //////////////////////////////////////////////////////////////////////////////// |
22 // RenderViewContextMenuViews, public: | 22 // RenderViewContextMenuViews, public: |
23 | 23 |
24 RenderViewContextMenuViews::RenderViewContextMenuViews( | 24 RenderViewContextMenuViews::RenderViewContextMenuViews( |
25 TabContents* tab_contents, | 25 TabContents* tab_contents, |
26 const ContextMenuParams& params) | 26 const ContextMenuParams& params) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 item->SetEnabled(enabled); | 113 item->SetEnabled(enabled); |
114 item->SetTitle(title); | 114 item->SetTitle(title); |
115 item->SetVisible(!hidden); | 115 item->SetVisible(!hidden); |
116 | 116 |
117 views::MenuItemView* parent = item->GetParentMenuItem(); | 117 views::MenuItemView* parent = item->GetParentMenuItem(); |
118 if (!parent) | 118 if (!parent) |
119 return; | 119 return; |
120 | 120 |
121 parent->ChildrenChanged(); | 121 parent->ChildrenChanged(); |
122 } | 122 } |
OLD | NEW |