OLD | NEW |
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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 | 505 |
506 // For testing. | 506 // For testing. |
507 WrenchMenuModel::WrenchMenuModel() | 507 WrenchMenuModel::WrenchMenuModel() |
508 : ui::SimpleMenuModel(this), | 508 : ui::SimpleMenuModel(this), |
509 provider_(NULL), | 509 provider_(NULL), |
510 browser_(NULL), | 510 browser_(NULL), |
511 tab_strip_model_(NULL) { | 511 tab_strip_model_(NULL) { |
512 } | 512 } |
513 | 513 |
514 bool WrenchMenuModel::ShouldShowNewIncognitoWindowMenuItem() { | 514 bool WrenchMenuModel::ShouldShowNewIncognitoWindowMenuItem() { |
515 if (browser_->profile()->IsManaged()) | 515 if (browser_->profile()->IsSupervised()) |
516 return false; | 516 return false; |
517 | 517 |
518 return !browser_->profile()->IsGuestSession(); | 518 return !browser_->profile()->IsGuestSession(); |
519 } | 519 } |
520 | 520 |
521 void WrenchMenuModel::Build(bool is_new_menu) { | 521 void WrenchMenuModel::Build(bool is_new_menu) { |
522 #if defined(OS_WIN) | 522 #if defined(OS_WIN) |
523 AddItem(IDC_VIEW_INCOMPATIBILITIES, | 523 AddItem(IDC_VIEW_INCOMPATIBILITIES, |
524 l10n_util::GetStringUTF16(IDS_VIEW_INCOMPATIBILITIES)); | 524 l10n_util::GetStringUTF16(IDS_VIEW_INCOMPATIBILITIES)); |
525 EnumerateModulesModel* model = | 525 EnumerateModulesModel* model = |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 &enable_increment, &enable_decrement); | 792 &enable_increment, &enable_decrement); |
793 } | 793 } |
794 zoom_label_ = l10n_util::GetStringFUTF16( | 794 zoom_label_ = l10n_util::GetStringFUTF16( |
795 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 795 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
796 } | 796 } |
797 | 797 |
798 void WrenchMenuModel::OnZoomLevelChanged( | 798 void WrenchMenuModel::OnZoomLevelChanged( |
799 const content::HostZoomMap::ZoomLevelChange& change) { | 799 const content::HostZoomMap::ZoomLevelChange& change) { |
800 UpdateZoomControls(); | 800 UpdateZoomControls(); |
801 } | 801 } |
OLD | NEW |