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

Side by Side Diff: content/shell/browser/shell_views.cc

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 years, 5 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
« no previous file with comments | « components/translate/core/browser/options_menu_model.cc ('k') | ui/app_list/app_list_menu.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/shell/browser/shell.h" 5 #include "content/shell/browser/shell.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 : ui::SimpleMenuModel(this), 64 : ui::SimpleMenuModel(this),
65 shell_(shell), 65 shell_(shell),
66 params_(params) { 66 params_(params) {
67 AddItem(COMMAND_OPEN_DEVTOOLS, base::ASCIIToUTF16("Inspect Element")); 67 AddItem(COMMAND_OPEN_DEVTOOLS, base::ASCIIToUTF16("Inspect Element"));
68 } 68 }
69 69
70 // ui::SimpleMenuModel::Delegate: 70 // ui::SimpleMenuModel::Delegate:
71 bool IsCommandIdChecked(int command_id) const override { return false; } 71 bool IsCommandIdChecked(int command_id) const override { return false; }
72 bool IsCommandIdEnabled(int command_id) const override { return true; } 72 bool IsCommandIdEnabled(int command_id) const override { return true; }
73 bool GetAcceleratorForCommandId(int command_id, 73 bool GetAcceleratorForCommandId(int command_id,
74 ui::Accelerator* accelerator) override { 74 ui::Accelerator* accelerator) const override {
75 return false; 75 return false;
76 } 76 }
77 void ExecuteCommand(int command_id, int event_flags) override { 77 void ExecuteCommand(int command_id, int event_flags) override {
78 switch (command_id) { 78 switch (command_id) {
79 case COMMAND_OPEN_DEVTOOLS: 79 case COMMAND_OPEN_DEVTOOLS:
80 shell_->ShowDevToolsForElementAt(params_.x, params_.y); 80 shell_->ShowDevToolsForElementAt(params_.x, params_.y);
81 break; 81 break;
82 }; 82 };
83 } 83 }
84 84
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 const content::ContextMenuParams& params) { 529 const content::ContextMenuParams& params) {
530 if (headless_) 530 if (headless_)
531 return true; 531 return true;
532 ShellWindowDelegateView* delegate_view = 532 ShellWindowDelegateView* delegate_view =
533 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 533 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
534 delegate_view->ShowWebViewContextMenu(params); 534 delegate_view->ShowWebViewContextMenu(params);
535 return true; 535 return true;
536 } 536 }
537 537
538 } // namespace content 538 } // namespace content
OLDNEW
« no previous file with comments | « components/translate/core/browser/options_menu_model.cc ('k') | ui/app_list/app_list_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698