| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 class View; | 12 class View; |
| 13 } // namespace views | 13 } // namespace views |
| 14 | 14 |
| 15 class Profile; | 15 class Profile; |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 | 18 |
| 19 // This class is an abstraction decoupling StatusAreaView from its host | 19 // This class is an abstraction decoupling StatusAreaView from its host |
| 20 // window. | 20 // window. |
| 21 class StatusAreaHost { | 21 class StatusAreaHost { |
| 22 public: | 22 public: |
| 23 // Different text styles for different types of backgrounds. |
| 24 enum TextStyle { |
| 25 kWhitePlain, |
| 26 kWhiteHaloed, |
| 27 kGrayEmbossed |
| 28 }; |
| 29 |
| 30 // The type of screen the host window is on. |
| 31 enum ScreenMode { |
| 32 kLoginMode, // The host is for the OOBE/login screens. |
| 33 kBrowserMode, // The host is for browser. |
| 34 kScreenLockerMode, // The host is for screen locker. |
| 35 }; |
| 36 |
| 23 // Returns the Profile if this status area is inside the browser and has a | 37 // Returns the Profile if this status area is inside the browser and has a |
| 24 // profile. Otherwise, returns NULL. | 38 // profile. Otherwise, returns NULL. |
| 25 virtual Profile* GetProfile() const = 0; | 39 virtual Profile* GetProfile() const = 0; |
| 26 | 40 |
| 27 // Returns native window hosting the status area. | 41 // Returns native window hosting the status area. |
| 28 virtual gfx::NativeWindow GetNativeWindow() const = 0; | 42 virtual gfx::NativeWindow GetNativeWindow() const = 0; |
| 29 | 43 |
| 30 // Indicates if options dialog related to the button specified should be | 44 // Indicates if options dialog related to the button specified should be |
| 31 // shown. | 45 // shown. |
| 32 virtual bool ShouldOpenButtonOptions( | 46 virtual bool ShouldOpenButtonOptions( |
| 33 const views::View* button_view) const = 0; | 47 const views::View* button_view) const = 0; |
| 34 | 48 |
| 35 // Opens options dialog related to the button specified. | 49 // Opens options dialog related to the button specified. |
| 36 virtual void OpenButtonOptions(const views::View* button_view) = 0; | 50 virtual void OpenButtonOptions(const views::View* button_view) = 0; |
| 37 | 51 |
| 38 // Executes browser command. | 52 // Executes browser command. |
| 39 virtual void ExecuteBrowserCommand(int id) const = 0; | 53 virtual void ExecuteBrowserCommand(int id) const = 0; |
| 40 | 54 |
| 41 // The type of screen the host window is on. | 55 // Returns the text style. |
| 42 enum ScreenMode { | 56 virtual TextStyle GetTextStyle() const = 0; |
| 43 kLoginMode, // The host is for the OOBE/login screens. | |
| 44 kBrowserMode, // The host is for browser. | |
| 45 kScreenLockerMode, // The host is for screen locker. | |
| 46 }; | |
| 47 | 57 |
| 48 // Returns the type of screen. | 58 // Returns the type of screen. |
| 49 virtual ScreenMode GetScreenMode() const = 0; | 59 virtual ScreenMode GetScreenMode() const = 0; |
| 50 | 60 |
| 51 protected: | 61 protected: |
| 52 virtual ~StatusAreaHost() {} | 62 virtual ~StatusAreaHost() {} |
| 53 }; | 63 }; |
| 54 | 64 |
| 55 } // namespace chromeos | 65 } // namespace chromeos |
| 56 | 66 |
| 57 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_ | 67 #endif // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_ |
| OLD | NEW |