status_area_host.h revision c407dc5cd9bdc5668497f21b26b09d988ab439de
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
8#include "gfx/native_widget_types.h"
9
10namespace views {
11class View;
12}  // namespace views
13
14class Profile;
15
16namespace chromeos {
17
18// This class is an abstraction decoupling StatusAreaView from its host
19// window.
20class StatusAreaHost {
21 public:
22  // Returns the Profile if this status area is inside the browser and has a
23  // profile. Otherwise, returns NULL.
24  virtual Profile* GetProfile() const = 0;
25
26  // Returns native window hosting the status area.
27  virtual gfx::NativeWindow GetNativeWindow() const = 0;
28
29  // Indicates if options dialog related to the button specified should be
30  // shown.
31  virtual bool ShouldOpenButtonOptions(
32      const views::View* button_view) const = 0;
33
34  // Opens options dialog related to the button specified.
35  virtual void OpenButtonOptions(const views::View* button_view) const = 0;
36
37  // Executes browser command.
38  virtual void ExecuteBrowserCommand(int id) const = 0;
39
40  // True if status area hosted in browser. Otherwise it's OOBE/login state.
41  virtual bool IsBrowserMode() const = 0;
42
43  // True if status area hosted in screen locker.
44  virtual bool IsScreenLockerMode() const = 0;
45
46 protected:
47  virtual ~StatusAreaHost() {}
48};
49
50}  // namespace chromeos
51
52#endif  // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_
53