Chromium Code Reviews| 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 if (browser_->profile()->IsManaged()) | 473 if (browser_->profile()->IsManaged()) |
| 474 return false; | 474 return false; |
| 475 | 475 |
| 476 #if defined(OS_WIN) | 476 #if defined(OS_WIN) |
| 477 if (win8::IsSingleWindowMetroMode() && | 477 if (win8::IsSingleWindowMetroMode() && |
| 478 browser_->profile()->HasOffTheRecordProfile()) { | 478 browser_->profile()->HasOffTheRecordProfile()) { |
| 479 return false; | 479 return false; |
| 480 } | 480 } |
| 481 #endif | 481 #endif |
| 482 | 482 |
| 483 #if defined(OS_CHROMEOS) | 483 if (browser_->profile()->IsGuestSession()) |
|
msw
2014/02/15 00:30:52
nit: just return !browser_->profile()->IsGuestSess
bcwhite
2014/02/18 15:19:36
Done.
| |
| 484 if (CommandLine::ForCurrentProcess()->HasSwitch( | |
| 485 chromeos::switches::kGuestSession)) { | |
| 486 return false; | 484 return false; |
| 487 } | |
| 488 #endif | |
| 489 | 485 |
| 490 return true; | 486 return true; |
| 491 } | 487 } |
| 492 | 488 |
| 493 bool WrenchMenuModel::ShouldShowNewWindowMenuItem() { | 489 bool WrenchMenuModel::ShouldShowNewWindowMenuItem() { |
| 494 #if defined(OS_WIN) | 490 #if defined(OS_WIN) |
| 495 if (!win8::IsSingleWindowMetroMode()) | 491 if (!win8::IsSingleWindowMetroMode()) |
| 496 return true; | 492 return true; |
| 497 | 493 |
| 498 // In Win8's single window Metro mode, we only show the New Window options | 494 // In Win8's single window Metro mode, we only show the New Window options |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 783 &enable_increment, &enable_decrement); | 779 &enable_increment, &enable_decrement); |
| 784 } | 780 } |
| 785 zoom_label_ = l10n_util::GetStringFUTF16( | 781 zoom_label_ = l10n_util::GetStringFUTF16( |
| 786 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 782 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
| 787 } | 783 } |
| 788 | 784 |
| 789 void WrenchMenuModel::OnZoomLevelChanged( | 785 void WrenchMenuModel::OnZoomLevelChanged( |
| 790 const content::HostZoomMap::ZoomLevelChange& change) { | 786 const content::HostZoomMap::ZoomLevelChange& change) { |
| 791 UpdateZoomControls(); | 787 UpdateZoomControls(); |
| 792 } | 788 } |
| OLD | NEW |