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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.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, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('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/toolbar/wrench_menu_model.h" 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 554
555 #endif 555 #endif
556 556
557 // Append the full menu including separators. The final separator only gets 557 // Append the full menu including separators. The final separator only gets
558 // appended when this is a touch menu - otherwise it would get added twice. 558 // appended when this is a touch menu - otherwise it would get added twice.
559 CreateCutCopyPasteMenu(is_new_menu); 559 CreateCutCopyPasteMenu(is_new_menu);
560 560
561 if (!is_new_menu) 561 if (!is_new_menu)
562 CreateZoomMenu(is_new_menu); 562 CreateZoomMenu(is_new_menu);
563 563
564 if (CommandLine::ForCurrentProcess()->HasSwitch(
565 switches::kEnableDomDistiller)) {
566 AddItemWithStringId(IDC_DISTILL_PAGE, IDS_DISTILL_PAGE);
567 }
568
564 AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE); 569 AddItemWithStringId(IDC_SAVE_PAGE, IDS_SAVE_PAGE);
565 AddItemWithStringId(IDC_FIND, IDS_FIND); 570 AddItemWithStringId(IDC_FIND, IDS_FIND);
566 AddItemWithStringId(IDC_PRINT, IDS_PRINT); 571 AddItemWithStringId(IDC_PRINT, IDS_PRINT);
567 572
568 tools_menu_model_.reset(new ToolsMenuModel(this, browser_)); 573 tools_menu_model_.reset(new ToolsMenuModel(this, browser_));
569 // In case of touch this is the last item. 574 // In case of touch this is the last item.
570 if (!is_new_menu) { 575 if (!is_new_menu) {
571 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_TOOLS_MENU, 576 AddSubMenuWithStringId(IDC_ZOOM_MENU, IDS_TOOLS_MENU,
572 tools_menu_model_.get()); 577 tools_menu_model_.get());
573 } 578 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 &enable_increment, &enable_decrement); 771 &enable_increment, &enable_decrement);
767 } 772 }
768 zoom_label_ = l10n_util::GetStringFUTF16( 773 zoom_label_ = l10n_util::GetStringFUTF16(
769 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 774 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
770 } 775 }
771 776
772 void WrenchMenuModel::OnZoomLevelChanged( 777 void WrenchMenuModel::OnZoomLevelChanged(
773 const content::HostZoomMap::ZoomLevelChange& change) { 778 const content::HostZoomMap::ZoomLevelChange& change) {
774 UpdateZoomControls(); 779 UpdateZoomControls();
775 } 780 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698