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

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

Issue 7067005: Remove Profile code from HostZoomMap. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)), 223 : ALLOW_THIS_IN_INITIALIZER_LIST(ui::SimpleMenuModel(this)),
224 provider_(provider), 224 provider_(provider),
225 browser_(browser), 225 browser_(browser),
226 tabstrip_model_(browser_->tabstrip_model()) { 226 tabstrip_model_(browser_->tabstrip_model()) {
227 Build(); 227 Build();
228 UpdateZoomControls(); 228 UpdateZoomControls();
229 229
230 tabstrip_model_->AddObserver(this); 230 tabstrip_model_->AddObserver(this);
231 231
232 registrar_.Add(this, NotificationType::ZOOM_LEVEL_CHANGED, 232 registrar_.Add(this, NotificationType::ZOOM_LEVEL_CHANGED,
233 Source<Profile>(browser_->profile())); 233 Source<HostZoomMap>(browser_->profile()->GetHostZoomMap()));
234 registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED, 234 registrar_.Add(this, NotificationType::NAV_ENTRY_COMMITTED,
235 NotificationService::AllSources()); 235 NotificationService::AllSources());
236 } 236 }
237 237
238 WrenchMenuModel::~WrenchMenuModel() { 238 WrenchMenuModel::~WrenchMenuModel() {
239 if (tabstrip_model_) 239 if (tabstrip_model_)
240 tabstrip_model_->RemoveObserver(this); 240 tabstrip_model_->RemoveObserver(this);
241 } 241 }
242 242
243 bool WrenchMenuModel::DoesCommandIdDismissMenu(int command_id) const { 243 bool WrenchMenuModel::DoesCommandIdDismissMenu(int command_id) const {
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 &enable_increment, &enable_decrement); 558 &enable_increment, &enable_decrement);
559 } 559 }
560 zoom_label_ = l10n_util::GetStringFUTF16( 560 zoom_label_ = l10n_util::GetStringFUTF16(
561 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 561 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
562 } 562 }
563 563
564 string16 WrenchMenuModel::GetSyncMenuLabel() const { 564 string16 WrenchMenuModel::GetSyncMenuLabel() const {
565 return sync_ui_util::GetSyncMenuLabel( 565 return sync_ui_util::GetSyncMenuLabel(
566 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); 566 browser_->profile()->GetOriginalProfile()->GetProfileSyncService());
567 } 567 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/ui/views/wrench_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698