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

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

Issue 13590004: Revert 192504 "Re-apply 192420: Move login switches to src/chromeos" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "grit/generated_resources.h" 51 #include "grit/generated_resources.h"
52 #include "grit/theme_resources.h" 52 #include "grit/theme_resources.h"
53 #include "ui/base/l10n/l10n_util.h" 53 #include "ui/base/l10n/l10n_util.h"
54 #include "ui/base/layout.h" 54 #include "ui/base/layout.h"
55 #include "ui/base/models/button_menu_item_model.h" 55 #include "ui/base/models/button_menu_item_model.h"
56 #include "ui/base/resource/resource_bundle.h" 56 #include "ui/base/resource/resource_bundle.h"
57 #include "ui/gfx/image/image.h" 57 #include "ui/gfx/image/image.h"
58 #include "ui/gfx/image/image_skia.h" 58 #include "ui/gfx/image/image_skia.h"
59 #include "ui/native_theme/native_theme.h" 59 #include "ui/native_theme/native_theme.h"
60 60
61 #if defined(OS_CHROMEOS)
62 #include "chromeos/chromeos_switches.h"
63 #endif
64
65 #if defined(OS_WIN) 61 #if defined(OS_WIN)
66 #include "base/win/metro.h" 62 #include "base/win/metro.h"
67 #include "base/win/windows_version.h" 63 #include "base/win/windows_version.h"
68 #include "chrome/browser/enumerate_modules_model_win.h" 64 #include "chrome/browser/enumerate_modules_model_win.h"
69 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" 65 #include "chrome/browser/ui/metro_pin_tab_helper_win.h"
70 #include "win8/util/win8_util.h" 66 #include "win8/util/win8_util.h"
71 #endif 67 #endif
72 68
73 #if defined(USE_ASH) 69 #if defined(USE_ASH)
74 #include "ash/shell.h" 70 #include "ash/shell.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 if (base::win::GetVersion() < base::win::VERSION_WIN8 && 496 if (base::win::GetVersion() < base::win::VERSION_WIN8 &&
501 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) { 497 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) {
502 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, 498 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP,
503 ash::Shell::HasInstance() ? IDS_CLOSE_ASH_DESKTOP : 499 ash::Shell::HasInstance() ? IDS_CLOSE_ASH_DESKTOP :
504 IDS_OPEN_ASH_DESKTOP); 500 IDS_OPEN_ASH_DESKTOP);
505 } 501 }
506 #endif 502 #endif
507 #else // defined(OS_WIN) 503 #else // defined(OS_WIN)
508 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); 504 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW);
509 #if defined(OS_CHROMEOS) 505 #if defined(OS_CHROMEOS)
510 if (!CommandLine::ForCurrentProcess()->HasSwitch( 506 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession))
511 chromeos::switches::kGuestSession))
512 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); 507 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
513 #else 508 #else
514 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); 509 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
515 #endif 510 #endif
516 511
517 #endif // else of defined(OS_WIN) 512 #endif // else of defined(OS_WIN)
518 513
519 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_)); 514 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_));
520 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU, 515 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU,
521 bookmark_sub_menu_model_.get()); 516 bookmark_sub_menu_model_.get());
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 &enable_increment, &enable_decrement); 761 &enable_increment, &enable_decrement);
767 } 762 }
768 zoom_label_ = l10n_util::GetStringFUTF16( 763 zoom_label_ = l10n_util::GetStringFUTF16(
769 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 764 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
770 } 765 }
771 766
772 void WrenchMenuModel::OnZoomLevelChanged( 767 void WrenchMenuModel::OnZoomLevelChanged(
773 const content::HostZoomMap::ZoomLevelChange& change) { 768 const content::HostZoomMap::ZoomLevelChange& change) {
774 UpdateZoomControls(); 769 UpdateZoomControls();
775 } 770 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698