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

Side by Side Diff: chrome/browser/ui/views/ash/status_area_host_aura.cc

Issue 9546013: Move IsRunningOnChromeOS to base/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: chromeos_version,sync,cleanup Created 8 years, 9 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/views/ash/status_area_host_aura.h" 5 #include "chrome/browser/ui/views/ash/status_area_host_aura.h"
6 6
7 #include "ash/shell_window_ids.h" 7 #include "ash/shell_window_ids.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/chromeos/status/clock_menu_button.h" 9 #include "chrome/browser/chromeos/status/clock_menu_button.h"
10 #include "chrome/browser/chromeos/status/memory_menu_button.h" 10 #include "chrome/browser/chromeos/status/memory_menu_button.h"
11 #include "chrome/browser/chromeos/status/status_area_view.h" 11 #include "chrome/browser/chromeos/status/status_area_view.h"
12 #include "chrome/browser/defaults.h" 12 #include "chrome/browser/defaults.h"
13 #include "chrome/browser/prefs/incognito_mode_prefs.h" 13 #include "chrome/browser/prefs/incognito_mode_prefs.h"
14 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/view_ids.h" 16 #include "chrome/browser/ui/view_ids.h"
17 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h" 17 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
18 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
21 #include "ui/aura/window.h" 21 #include "ui/aura/window.h"
22 #include "ui/views/widget/widget.h" 22 #include "ui/views/widget/widget.h"
23 23
24 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
25 #include "base/chromeos/chromeos_version.h"
25 #include "chrome/browser/chromeos/login/base_login_display_host.h" 26 #include "chrome/browser/chromeos/login/base_login_display_host.h"
26 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h" 27 #include "chrome/browser/chromeos/login/proxy_settings_dialog.h"
27 #include "chrome/browser/chromeos/login/screen_locker.h" 28 #include "chrome/browser/chromeos/login/screen_locker.h"
28 #include "chrome/browser/chromeos/login/user_manager.h" 29 #include "chrome/browser/chromeos/login/user_manager.h"
29 #include "chrome/browser/chromeos/status/clock_updater.h" 30 #include "chrome/browser/chromeos/status/clock_updater.h"
30 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h" 31 #include "chrome/browser/chromeos/status/status_area_view_chromeos.h"
31 #include "chrome/browser/chromeos/system/runtime_environment.h"
32 #include "ui/gfx/native_widget_types.h" 32 #include "ui/gfx/native_widget_types.h"
33 #endif 33 #endif
34 34
35 StatusAreaHostAura::StatusAreaHostAura() 35 StatusAreaHostAura::StatusAreaHostAura()
36 : status_area_widget_(NULL), 36 : status_area_widget_(NULL),
37 status_area_view_(NULL) { 37 status_area_view_(NULL) {
38 BrowserList::AddObserver(this); 38 BrowserList::AddObserver(this);
39 registrar_.Add(this, 39 registrar_.Add(this,
40 chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 40 chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
41 content::NotificationService::AllSources()); 41 content::NotificationService::AllSources());
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 break; 206 break;
207 #endif 207 #endif
208 default: 208 default:
209 NOTREACHED() << "Unexpected notification " << type; 209 NOTREACHED() << "Unexpected notification " << type;
210 } 210 }
211 } 211 }
212 212
213 bool StatusAreaHostAura::IsLoginOrLockScreenDisplayed() const { 213 bool StatusAreaHostAura::IsLoginOrLockScreenDisplayed() const {
214 #if defined(OS_CHROMEOS) 214 #if defined(OS_CHROMEOS)
215 if (!chromeos::UserManager::Get()->IsUserLoggedIn() && 215 if (!chromeos::UserManager::Get()->IsUserLoggedIn() &&
216 chromeos::system::runtime_environment::IsRunningOnChromeOS()) 216 base::chromeos::IsRunningOnChromeOS())
217 return true; 217 return true;
218 218
219 const chromeos::ScreenLocker* locker = 219 const chromeos::ScreenLocker* locker =
220 chromeos::ScreenLocker::default_screen_locker(); 220 chromeos::ScreenLocker::default_screen_locker();
221 if (locker && locker->locked()) 221 if (locker && locker->locked())
222 return true; 222 return true;
223 #endif 223 #endif
224 224
225 return false; 225 return false;
226 } 226 }
227 227
228 void StatusAreaHostAura::UpdateAppearance() { 228 void StatusAreaHostAura::UpdateAppearance() {
229 status_area_view_->UpdateButtonTextStyle(); 229 status_area_view_->UpdateButtonTextStyle();
230 } 230 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/caps_lock_handler.cc ('k') | chrome/browser/ui/views/ash/status_area_host_aura_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698