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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.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
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/bookmarks/bookmark_editor_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 case IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM: 183 case IDS_BOOKMARK_EDITOR_NEW_FOLDER_MENU_ITEM:
184 return true; 184 return true;
185 default: 185 default:
186 NOTREACHED(); 186 NOTREACHED();
187 return false; 187 return false;
188 } 188 }
189 } 189 }
190 190
191 bool BookmarkEditorView::GetAcceleratorForCommandId( 191 bool BookmarkEditorView::GetAcceleratorForCommandId(
192 int command_id, 192 int command_id,
193 ui::Accelerator* accelerator) { 193 ui::Accelerator* accelerator) const {
194 return GetWidget()->GetAccelerator(command_id, accelerator); 194 return GetWidget()->GetAccelerator(command_id, accelerator);
195 } 195 }
196 196
197 void BookmarkEditorView::ExecuteCommand(int command_id, int event_flags) { 197 void BookmarkEditorView::ExecuteCommand(int command_id, int event_flags) {
198 DCHECK(tree_view_->GetSelectedNode()); 198 DCHECK(tree_view_->GetSelectedNode());
199 if (command_id == IDS_EDIT) { 199 if (command_id == IDS_EDIT) {
200 tree_view_->StartEditing(tree_view_->GetSelectedNode()); 200 tree_view_->StartEditing(tree_view_->GetSelectedNode());
201 } else if (command_id == IDS_DELETE) { 201 } else if (command_id == IDS_DELETE) {
202 EditorNode* node = tree_model_->AsNode(tree_view_->GetSelectedNode()); 202 EditorNode* node = tree_model_->AsNode(tree_view_->GetSelectedNode());
203 if (!node) 203 if (!node)
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 Profile* profile, 649 Profile* profile,
650 const BookmarkEditor::EditDetails& details, 650 const BookmarkEditor::EditDetails& details,
651 BookmarkEditor::Configuration configuration) { 651 BookmarkEditor::Configuration configuration) {
652 DCHECK(profile); 652 DCHECK(profile);
653 BookmarkEditorView* editor = new BookmarkEditorView( 653 BookmarkEditorView* editor = new BookmarkEditorView(
654 profile, details.parent_node, details, configuration); 654 profile, details.parent_node, details, configuration);
655 editor->Show(parent_window); 655 editor->Show(parent_window);
656 } 656 }
657 657
658 } // namespace chrome 658 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_editor_view.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698