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

Side by Side Diff: chrome/browser/ui/views/aura/chrome_shell_delegate.cc

Issue 9309088: Don't send lock screen request for guest sessions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/views/aura/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
6 6
7 #include "ash/launcher/launcher_types.h" 7 #include "ash/launcher/launcher_types.h"
8 #include "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/defaults.h" 10 #include "chrome/browser/defaults.h"
11 #include "chrome/browser/prefs/incognito_mode_prefs.h" 11 #include "chrome/browser/prefs/incognito_mode_prefs.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/ui/browser.h" 13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/browser_list.h" 14 #include "chrome/browser/ui/browser_list.h"
15 #include "chrome/browser/ui/views/aura/app_list/app_list_model_builder.h" 15 #include "chrome/browser/ui/views/aura/app_list/app_list_model_builder.h"
16 #include "chrome/browser/ui/views/aura/app_list/app_list_view_delegate.h" 16 #include "chrome/browser/ui/views/aura/app_list/app_list_view_delegate.h"
17 #include "chrome/browser/ui/views/aura/launcher_icon_updater.h" 17 #include "chrome/browser/ui/views/aura/launcher_icon_updater.h"
18 #include "chrome/browser/ui/views/aura/status_area_host_aura.h" 18 #include "chrome/browser/ui/views/aura/status_area_host_aura.h"
19 #include "chrome/browser/ui/views/frame/browser_view.h" 19 #include "chrome/browser/ui/views/frame/browser_view.h"
20 #include "chrome/common/chrome_switches.h"
20 #include "grit/theme_resources.h" 21 #include "grit/theme_resources.h"
21 #include "ui/aura/window.h" 22 #include "ui/aura/window.h"
22 23
23 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
24 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" 25 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
25 #include "chrome/browser/chromeos/dbus/power_manager_client.h" 26 #include "chrome/browser/chromeos/dbus/power_manager_client.h"
26 #endif 27 #endif
27 namespace { 28 namespace {
28 29
29 // Returns a list of Aura windows from a BrowserList, using either a 30 // Returns a list of Aura windows from a BrowserList, using either a
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 62
62 views::Widget* ChromeShellDelegate::CreateStatusArea() { 63 views::Widget* ChromeShellDelegate::CreateStatusArea() {
63 status_area_host_.reset(new StatusAreaHostAura()); 64 status_area_host_.reset(new StatusAreaHostAura());
64 views::Widget* status_area_widget = 65 views::Widget* status_area_widget =
65 status_area_host_.get()->CreateStatusArea(); 66 status_area_host_.get()->CreateStatusArea();
66 return status_area_widget; 67 return status_area_widget;
67 } 68 }
68 69
69 #if defined(OS_CHROMEOS) 70 #if defined(OS_CHROMEOS)
70 void ChromeShellDelegate::LockScreen() { 71 void ChromeShellDelegate::LockScreen() {
71 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 72 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) {
72 NotifyScreenLockRequested(); 73 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
74 NotifyScreenLockRequested();
75 }
73 } 76 }
74 #endif 77 #endif
75 78
76 void ChromeShellDelegate::Exit() { 79 void ChromeShellDelegate::Exit() {
77 BrowserList::AttemptUserExit(); 80 BrowserList::AttemptUserExit();
78 } 81 }
79 82
80 void ChromeShellDelegate::BuildAppListModel(ash::AppListModel* model) { 83 void ChromeShellDelegate::BuildAppListModel(ash::AppListModel* model) {
81 AppListModelBuilder builder(ProfileManager::GetDefaultProfile(), 84 AppListModelBuilder builder(ProfileManager::GetDefaultProfile(),
82 model); 85 model);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 131 }
129 132
130 int ChromeShellDelegate::GetBrowserShortcutResourceId() { 133 int ChromeShellDelegate::GetBrowserShortcutResourceId() {
131 return IDR_PRODUCT_LOGO_32; 134 return IDR_PRODUCT_LOGO_32;
132 } 135 }
133 136
134 string16 ChromeShellDelegate::GetLauncherItemTitle( 137 string16 ChromeShellDelegate::GetLauncherItemTitle(
135 const ash::LauncherItem& item) { 138 const ash::LauncherItem& item) {
136 return LauncherIconUpdater::GetTitleByID(item.id); 139 return LauncherIconUpdater::GetTitleByID(item.id);
137 } 140 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698