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

Unified Diff: chrome/browser/chromeos/status/status_area_view_chromeos.h

Issue 8438064: Separate StatusAreaView from StatusAreaViewChromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/status/status_area_view_chromeos.h
diff --git a/chrome/browser/chromeos/status/status_area_view_chromeos.h b/chrome/browser/chromeos/status/status_area_view_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..bf9da99e2b1984274be79c292ae913e670e85a8b
--- /dev/null
+++ b/chrome/browser/chromeos/status/status_area_view_chromeos.h
@@ -0,0 +1,61 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_VIEW_CHROMEOS_H_
+#define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_VIEW_CHROMEOS_H_
+#pragma once
+
+#include "chrome/browser/chromeos/status/status_area_view.h"
+
+#include "chrome/browser/chromeos/cros/power_library.h"
+#include "chrome/browser/chromeos/system/timezone_settings.h"
+#include "chrome/browser/chromeos/view_ids.h"
+
+namespace chromeos {
+
+class StatusAreaViewChromeos : public StatusAreaView,
+ public PowerLibrary::Observer,
+ public system::TimezoneSettings::Observer {
+ public:
+ // The type of screen the host window is on.
+ enum ScreenMode {
+ LOGIN_MODE_VIEWS, // The host is for the views-based OOBE/login screens.
+ LOGIN_MODE_WEBUI, // The host is for the WebUI OOBE/login screens.
+ BROWSER_MODE, // The host is for browser.
+ SCREEN_LOCKER_MODE, // The host is for screen locker.
+ };
+
+ // Commands to be passed to StatusAreaButton::Delegate:ExecuteCommand().
+ enum Command {
+ SHOW_LANGUAGE_OPTIONS,
+ SHOW_NETWORK_OPTIONS,
+ SHOW_SYSTEM_OPTIONS
+ };
+
+ explicit StatusAreaViewChromeos();
+ virtual ~StatusAreaViewChromeos();
+
+ void Init(StatusAreaButton::Delegate* delegate, ScreenMode screen_mode);
+
+ // PowerLibrary::Observer:
+ virtual void PowerChanged(const PowerSupplyStatus& status) OVERRIDE;
+ virtual void SystemResumed() OVERRIDE;
+
+ // TimezoneSettings::Observer:
+ virtual void TimezoneChanged(const icu::TimeZone& timezone) OVERRIDE;
+
+ // Convenience function to add buttons to a status area for ChromeOS.
+ static void AddChromeosButtons(StatusAreaView* status_area,
+ StatusAreaButton::Delegate* delegate,
+ ScreenMode screen_mode);
+
+ private:
+ void UpdateClockText();
+
+ DISALLOW_COPY_AND_ASSIGN(StatusAreaViewChromeos);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_VIEW_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698