• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_HOST_H_
6 #define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_
7 #pragma once
8 
9 #include "ui/gfx/native_widget_types.h"
10 
11 namespace views {
12 class View;
13 }  // namespace views
14 
15 class Profile;
16 
17 namespace chromeos {
18 
19 // This class is an abstraction decoupling StatusAreaView from its host
20 // window.
21 class StatusAreaHost {
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 
37   // Returns the Profile if this status area is inside the browser and has a
38   // profile. Otherwise, returns NULL.
39   virtual Profile* GetProfile() const = 0;
40 
41   // Returns native window hosting the status area.
42   virtual gfx::NativeWindow GetNativeWindow() const = 0;
43 
44   // Indicates if options dialog related to the button specified should be
45   // shown.
46   virtual bool ShouldOpenButtonOptions(
47       const views::View* button_view) const = 0;
48 
49   // Opens options dialog related to the button specified.
50   virtual void OpenButtonOptions(const views::View* button_view) = 0;
51 
52   // Executes browser command.
53   virtual void ExecuteBrowserCommand(int id) const = 0;
54 
55   // Returns the text style.
56   virtual TextStyle GetTextStyle() const = 0;
57 
58   // Returns the type of screen.
59   virtual ScreenMode GetScreenMode() const = 0;
60 
61  protected:
~StatusAreaHost()62   virtual ~StatusAreaHost() {}
63 };
64 
65 }  // namespace chromeos
66 
67 #endif  // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_
68