OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_VIEW_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_VIEW_CHROMEOS_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/chromeos/status/status_area_view.h" |
| 10 |
| 11 #include "chrome/browser/chromeos/cros/power_library.h" |
| 12 #include "chrome/browser/chromeos/system/timezone_settings.h" |
| 13 #include "chrome/browser/chromeos/view_ids.h" |
| 14 |
| 15 namespace chromeos { |
| 16 |
| 17 class StatusAreaViewChromeos : public StatusAreaView, |
| 18 public PowerLibrary::Observer, |
| 19 public system::TimezoneSettings::Observer { |
| 20 public: |
| 21 // The type of screen the host window is on. |
| 22 enum ScreenMode { |
| 23 LOGIN_MODE_VIEWS, // The host is for the views-based OOBE/login screens. |
| 24 LOGIN_MODE_WEBUI, // The host is for the WebUI OOBE/login screens. |
| 25 BROWSER_MODE, // The host is for browser. |
| 26 SCREEN_LOCKER_MODE, // The host is for screen locker. |
| 27 }; |
| 28 |
| 29 // Commands to be passed to StatusAreaButton::Delegate:ExecuteCommand(). |
| 30 enum Command { |
| 31 SHOW_LANGUAGE_OPTIONS, |
| 32 SHOW_NETWORK_OPTIONS, |
| 33 SHOW_SYSTEM_OPTIONS |
| 34 }; |
| 35 |
| 36 explicit StatusAreaViewChromeos(); |
| 37 virtual ~StatusAreaViewChromeos(); |
| 38 |
| 39 void Init(StatusAreaButton::Delegate* delegate, ScreenMode screen_mode); |
| 40 |
| 41 // PowerLibrary::Observer: |
| 42 virtual void PowerChanged(const PowerSupplyStatus& status) OVERRIDE; |
| 43 virtual void SystemResumed() OVERRIDE; |
| 44 |
| 45 // TimezoneSettings::Observer: |
| 46 virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE; |
| 47 |
| 48 // Convenience function to add buttons to a status area for ChromeOS. |
| 49 static void AddChromeosButtons(StatusAreaView* status_area, |
| 50 StatusAreaButton::Delegate* delegate, |
| 51 ScreenMode screen_mode); |
| 52 |
| 53 private: |
| 54 void UpdateClockText(); |
| 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(StatusAreaViewChromeos); |
| 57 }; |
| 58 |
| 59 } // namespace chromeos |
| 60 |
| 61 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_VIEW_CHROMEOS_H_ |
OLD | NEW |