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

Unified Diff: chrome/browser/ui/browser_command_controller.cc

Issue 269723009: Add UI in Aura for distilling web pages and update Chrome Shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.cc
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index d6bccf483f4d35ce9b81a1c525e828bc91af4af1..d036d1646e193cfda39830f38b0b25968329f406 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -765,6 +765,9 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
case IDC_TOGGLE_SPEECH_INPUT:
ToggleSpeechInput(browser_);
break;
+ case IDC_DISTILL_PAGE:
+ DistillCurrentPage(browser_);
+ break;
default:
LOG(WARNING) << "Received Unimplemented Command: " << id;
@@ -1008,6 +1011,12 @@ void BrowserCommandController::InitCommandState() {
// Toggle speech input
command_updater_.UpdateCommandEnabled(IDC_TOGGLE_SPEECH_INPUT, true);
+ // Distill current page.
+ command_updater_.UpdateCommandEnabled(
+ IDC_DISTILL_PAGE,
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableDomDistiller));
+
// Initialize other commands whose state changes based on various conditions.
UpdateCommandsForFullscreenMode();
UpdateCommandsForContentRestrictionState();
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/ui/browser_commands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698