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

Side by Side Diff: chrome/browser/ui/browser_command_controller.cc

Issue 807053005: Use BrowserCommandController's logic uniformly for bookmark command enable/disable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: . Created 6 years 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 | « chrome/browser/ui/browser_command_controller.h ('k') | no next file » | 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/ui/browser_command_controller.h" 5 #include "chrome/browser/ui/browser_command_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 void BrowserCommandController::PrintingStateChanged() { 334 void BrowserCommandController::PrintingStateChanged() {
335 UpdatePrintingState(); 335 UpdatePrintingState();
336 } 336 }
337 337
338 void BrowserCommandController::LoadingStateChanged(bool is_loading, 338 void BrowserCommandController::LoadingStateChanged(bool is_loading,
339 bool force) { 339 bool force) {
340 UpdateReloadStopState(is_loading, force); 340 UpdateReloadStopState(is_loading, force);
341 } 341 }
342 342
343 void BrowserCommandController::ExtensionStateChanged() {
344 // Extensions may disable the bookmark editing commands.
345 UpdateCommandsForBookmarkEditing();
346 }
347
343 //////////////////////////////////////////////////////////////////////////////// 348 ////////////////////////////////////////////////////////////////////////////////
344 // BrowserCommandController, CommandUpdaterDelegate implementation: 349 // BrowserCommandController, CommandUpdaterDelegate implementation:
345 350
346 void BrowserCommandController::ExecuteCommandWithDisposition( 351 void BrowserCommandController::ExecuteCommandWithDisposition(
347 int id, 352 int id,
348 WindowOpenDisposition disposition) { 353 WindowOpenDisposition disposition) {
349 // No commands are enabled if there is not yet any selected tab. 354 // No commands are enabled if there is not yet any selected tab.
350 // TODO(pkasting): It seems like we should not need this, because either 355 // TODO(pkasting): It seems like we should not need this, because either
351 // most/all commands should not have been enabled yet anyway or the ones that 356 // most/all commands should not have been enabled yet anyway or the ones that
352 // are enabled should be global, or safe themselves against having no selected 357 // are enabled should be global, or safe themselves against having no selected
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 1347
1343 BrowserWindow* BrowserCommandController::window() { 1348 BrowserWindow* BrowserCommandController::window() {
1344 return browser_->window(); 1349 return browser_->window();
1345 } 1350 }
1346 1351
1347 Profile* BrowserCommandController::profile() { 1352 Profile* BrowserCommandController::profile() {
1348 return browser_->profile(); 1353 return browser_->profile();
1349 } 1354 }
1350 1355
1351 } // namespace chrome 1356 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698