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

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

Issue 13671005: Re-apply 192420: Move login switches to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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
61 #if defined(OS_WIN) 65 #if defined(OS_WIN)
62 #include "base/win/metro.h" 66 #include "base/win/metro.h"
63 #include "base/win/windows_version.h" 67 #include "base/win/windows_version.h"
64 #include "chrome/browser/enumerate_modules_model_win.h" 68 #include "chrome/browser/enumerate_modules_model_win.h"
65 #include "chrome/browser/ui/metro_pin_tab_helper_win.h" 69 #include "chrome/browser/ui/metro_pin_tab_helper_win.h"
66 #include "win8/util/win8_util.h" 70 #include "win8/util/win8_util.h"
67 #endif 71 #endif
68 72
69 #if defined(USE_ASH) 73 #if defined(USE_ASH)
70 #include "ash/shell.h" 74 #include "ash/shell.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 if (base::win::GetVersion() < base::win::VERSION_WIN8 && 500 if (base::win::GetVersion() < base::win::VERSION_WIN8 &&
497 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) { 501 chrome::HOST_DESKTOP_TYPE_NATIVE != chrome::HOST_DESKTOP_TYPE_ASH) {
498 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP, 502 AddItemWithStringId(IDC_TOGGLE_ASH_DESKTOP,
499 ash::Shell::HasInstance() ? IDS_CLOSE_ASH_DESKTOP : 503 ash::Shell::HasInstance() ? IDS_CLOSE_ASH_DESKTOP :
500 IDS_OPEN_ASH_DESKTOP); 504 IDS_OPEN_ASH_DESKTOP);
501 } 505 }
502 #endif 506 #endif
503 #else // defined(OS_WIN) 507 #else // defined(OS_WIN)
504 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW); 508 AddItemWithStringId(IDC_NEW_WINDOW, IDS_NEW_WINDOW);
505 #if defined(OS_CHROMEOS) 509 #if defined(OS_CHROMEOS)
506 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) 510 if (!CommandLine::ForCurrentProcess()->HasSwitch(
511 chromeos::switches::kGuestSession))
507 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); 512 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
508 #else 513 #else
509 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW); 514 AddItemWithStringId(IDC_NEW_INCOGNITO_WINDOW, IDS_NEW_INCOGNITO_WINDOW);
510 #endif 515 #endif
511 516
512 #endif // else of defined(OS_WIN) 517 #endif // else of defined(OS_WIN)
513 518
514 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_)); 519 bookmark_sub_menu_model_.reset(new BookmarkSubMenuModel(this, browser_));
515 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU, 520 AddSubMenuWithStringId(IDC_BOOKMARKS_MENU, IDS_BOOKMARKS_MENU,
516 bookmark_sub_menu_model_.get()); 521 bookmark_sub_menu_model_.get());
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 &enable_increment, &enable_decrement); 766 &enable_increment, &enable_decrement);
762 } 767 }
763 zoom_label_ = l10n_util::GetStringFUTF16( 768 zoom_label_ = l10n_util::GetStringFUTF16(
764 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 769 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
765 } 770 }
766 771
767 void WrenchMenuModel::OnZoomLevelChanged( 772 void WrenchMenuModel::OnZoomLevelChanged(
768 const content::HostZoomMap::ZoomLevelChange& change) { 773 const content::HostZoomMap::ZoomLevelChange& change) {
769 UpdateZoomControls(); 774 UpdateZoomControls();
770 } 775 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | chrome/browser/ui/webui/chromeos/login/reset_screen_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698