status_area_host.h revision 72a454cd3513ac24fbdd0e0cb9ad70b86a99b801
1// Copyright (c) 2010 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
11namespace views {
12class View;
13}  // namespace views
14
15class Profile;
16
17namespace chromeos {
18
19// This class is an abstraction decoupling StatusAreaView from its host
20// window.
21class StatusAreaHost {
22 public:
23  // Returns the Profile if this status area is inside the browser and has a
24  // profile. Otherwise, returns NULL.
25  virtual Profile* GetProfile() const = 0;
26
27  // Returns native window hosting the status area.
28  virtual gfx::NativeWindow GetNativeWindow() const = 0;
29
30  // Indicates if options dialog related to the button specified should be
31  // shown.
32  virtual bool ShouldOpenButtonOptions(
33      const views::View* button_view) const = 0;
34
35  // Opens options dialog related to the button specified.
36  virtual void OpenButtonOptions(const views::View* button_view) = 0;
37
38  // Executes browser command.
39  virtual void ExecuteBrowserCommand(int id) const = 0;
40
41  // The type of screen the host window is on.
42  enum ScreenMode {
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
48  // Returns the type of screen.
49  virtual ScreenMode GetScreenMode() const = 0;
50
51 protected:
52  virtual ~StatusAreaHost() {}
53};
54
55}  // namespace chromeos
56
57#endif  // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_
58