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

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

Issue 10056001: chromeos: Remove old status-area related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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/views/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
6 6
7 #include "ash/launcher/launcher_types.h" 7 #include "ash/launcher/launcher_types.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/wm/partial_screenshot_view.h" 9 #include "ash/wm/partial_screenshot_view.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "chrome/browser/chromeos/login/screen_locker.h" 12 #include "chrome/browser/chromeos/login/screen_locker.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_list.h" 15 #include "chrome/browser/ui/browser_list.h"
16 #include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h" 16 #include "chrome/browser/ui/views/ash/app_list/app_list_view_delegate.h"
17 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.h" 17 #include "chrome/browser/ui/views/ash/launcher/chrome_launcher_delegate.h"
18 #include "chrome/browser/ui/views/ash/status_area_host_aura.h"
19 #include "chrome/browser/ui/views/ash/window_positioner.h" 18 #include "chrome/browser/ui/views/ash/window_positioner.h"
20 #include "chrome/browser/ui/views/frame/browser_view.h" 19 #include "chrome/browser/ui/views/frame/browser_view.h"
21 #include "chrome/common/chrome_notification_types.h" 20 #include "chrome/common/chrome_notification_types.h"
22 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
23 #include "content/public/browser/notification_service.h" 22 #include "content/public/browser/notification_service.h"
24 #include "ui/aura/window.h" 23 #include "ui/aura/window.h"
25 24
26 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
27 #include "base/chromeos/chromeos_version.h" 26 #include "base/chromeos/chromeos_version.h"
28 #include "chrome/browser/chromeos/background/desktop_background_observer.h" 27 #include "chrome/browser/chromeos/background/desktop_background_observer.h"
(...skipping 16 matching lines...) Expand all
45 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 44 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
46 content::NotificationService::AllSources()); 45 content::NotificationService::AllSources());
47 #endif 46 #endif
48 } 47 }
49 48
50 ChromeShellDelegate::~ChromeShellDelegate() { 49 ChromeShellDelegate::~ChromeShellDelegate() {
51 if (instance_ == this) 50 if (instance_ == this)
52 instance_ = NULL; 51 instance_ = NULL;
53 } 52 }
54 53
55 StatusAreaView* ChromeShellDelegate::GetStatusArea() {
56 return status_area_host_->GetStatusArea();
57 }
58
59 views::Widget* ChromeShellDelegate::CreateStatusArea() {
60 status_area_host_.reset(new StatusAreaHostAura());
61 views::Widget* status_area_widget =
62 status_area_host_.get()->CreateStatusArea();
63 return status_area_widget;
64 }
65
66 bool ChromeShellDelegate::IsUserLoggedIn() { 54 bool ChromeShellDelegate::IsUserLoggedIn() {
67 #if defined(OS_CHROMEOS) 55 #if defined(OS_CHROMEOS)
68 // When running a Chrome OS build outside of a device (i.e. on a developer's 56 // When running a Chrome OS build outside of a device (i.e. on a developer's
69 // workstation), pretend like we're always logged in. 57 // workstation), pretend like we're always logged in.
70 if (!base::chromeos::IsRunningOnChromeOS()) 58 if (!base::chromeos::IsRunningOnChromeOS())
71 return true; 59 return true;
72 60
73 return chromeos::UserManager::Get()->IsUserLoggedIn(); 61 return chromeos::UserManager::Get()->IsUserLoggedIn();
74 #else 62 #else
75 return true; 63 return true;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ash::Shell::GetInstance()->CreateLauncher(); 143 ash::Shell::GetInstance()->CreateLauncher();
156 break; 144 break;
157 default: 145 default:
158 NOTREACHED() << "Unexpected notification " << type; 146 NOTREACHED() << "Unexpected notification " << type;
159 } 147 }
160 #else 148 #else
161 // MSVC++ warns about switch statements without any cases. 149 // MSVC++ warns about switch statements without any cases.
162 NOTREACHED() << "Unexpected notification " << type; 150 NOTREACHED() << "Unexpected notification " << type;
163 #endif 151 #endif
164 } 152 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/views/ash/status_area_host_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698