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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 490123003: Move bookmark_pref_names.* into bookmarks namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 6 years, 3 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/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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // FullscreenController since we want to be able to distinguish this event 414 // FullscreenController since we want to be able to distinguish this event
415 // and a menu which is under development. 415 // and a menu which is under development.
416 content::RecordAction(UserMetricsAction("EnterFullScreenWithWrenchMenu")); 416 content::RecordAction(UserMetricsAction("EnterFullScreenWithWrenchMenu"));
417 } 417 }
418 418
419 chrome::ExecuteCommand(browser_, command_id); 419 chrome::ExecuteCommand(browser_, command_id);
420 } 420 }
421 421
422 bool WrenchMenuModel::IsCommandIdChecked(int command_id) const { 422 bool WrenchMenuModel::IsCommandIdChecked(int command_id) const {
423 if (command_id == IDC_SHOW_BOOKMARK_BAR) { 423 if (command_id == IDC_SHOW_BOOKMARK_BAR) {
424 return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); 424 return browser_->profile()->GetPrefs()->GetBoolean(
425 bookmarks::prefs::kShowBookmarkBar);
425 } else if (command_id == IDC_PROFILING_ENABLED) { 426 } else if (command_id == IDC_PROFILING_ENABLED) {
426 return Profiling::BeingProfiled(); 427 return Profiling::BeingProfiled();
427 } else if (command_id == IDC_TOGGLE_REQUEST_TABLET_SITE) { 428 } else if (command_id == IDC_TOGGLE_REQUEST_TABLET_SITE) {
428 return chrome::IsRequestingTabletSite(browser_); 429 return chrome::IsRequestingTabletSite(browser_);
429 } 430 }
430 431
431 return false; 432 return false;
432 } 433 }
433 434
434 bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const { 435 bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const {
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 ->GetZoomPercent(); 795 ->GetZoomPercent();
795 } 796 }
796 zoom_label_ = l10n_util::GetStringFUTF16( 797 zoom_label_ = l10n_util::GetStringFUTF16(
797 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 798 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
798 } 799 }
799 800
800 void WrenchMenuModel::OnZoomLevelChanged( 801 void WrenchMenuModel::OnZoomLevelChanged(
801 const content::HostZoomMap::ZoomLevelChange& change) { 802 const content::HostZoomMap::ZoomLevelChange& change) {
802 UpdateZoomControls(); 803 UpdateZoomControls();
803 } 804 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698