| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 browser_->host_desktop_type()) == NULL) { | 457 browser_->host_desktop_type()) == NULL) { |
| 458 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); | 458 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); |
| 459 } | 459 } |
| 460 } else if (!browser_->profile()->HasOffTheRecordProfile()) { | 460 } else if (!browser_->profile()->HasOffTheRecordProfile()) { |
| 461 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); | 461 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); |
| 462 } | 462 } |
| 463 } else { | 463 } else { |
| 464 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); | 464 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); |
| 465 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); | 465 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); |
| 466 } | 466 } |
| 467 #if defined(USE_ASH) | 467 #if !defined(NDEBUG) && defined(USE_ASH) |
| 468 if (base::win::GetVersion() < base::win::VERSION_WIN8 && | 468 if (base::win::GetVersion() < base::win::VERSION_WIN8 && |
| 469 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) { | 469 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) { |
| 470 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, | 470 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, |
| 471 ash::Shell::HasInstance() ? IDS_CLOSE_ASH_DESKTOP : | 471 ash::Shell::HasInstance() ? IDS_CLOSE_ASH_DESKTOP : |
| 472 IDS_OPEN_ASH_DESKTOP); | 472 IDS_OPEN_ASH_DESKTOP); |
| 473 } | 473 } |
| 474 #endif | 474 #endif |
| 475 #else // defined(OS_WIN) | 475 #else // defined(OS_WIN) |
| 476 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); | 476 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); |
| 477 #if defined(OS_CHROMEOS) | 477 #if defined(OS_CHROMEOS) |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 browser_->tab_strip_model()->GetActiveWebContents()->GetZoomPercent( | 694 browser_->tab_strip_model()->GetActiveWebContents()->GetZoomPercent( |
| 695 &enable_increment, &enable_decrement); | 695 &enable_increment, &enable_decrement); |
| 696 } | 696 } |
| 697 zoom_label_ = l10n_util::GetStringFUTF16( | 697 zoom_label_ = l10n_util::GetStringFUTF16( |
| 698 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); | 698 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); |
| 699 } | 699 } |
| 700 | 700 |
| 701 void WrenchMenuModel::OnZoomLevelChanged(const std::string& host) { | 701 void WrenchMenuModel::OnZoomLevelChanged(const std::string& host) { |
| 702 UpdateZoomControls(); | 702 UpdateZoomControls(); |
| 703 } | 703 } |
| OLD | NEW |