summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/status/status_area_host.h
blob: e61cf7c6f3b9f22345d9e2ffe6530234f228cad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (c) 2010 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_HOST_H_
#define CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_

#include "gfx/native_widget_types.h"

namespace views {
class View;
}  // namespace views

class Profile;

namespace chromeos {

// This class is an abstraction decoupling StatusAreaView from its host
// window.
class StatusAreaHost {
 public:
  // Returns the Profile if this status area is inside the browser and has a
  // profile. Otherwise, returns NULL.
  virtual Profile* GetProfile() const = 0;

  // Returns native window hosting the status area.
  virtual gfx::NativeWindow GetNativeWindow() const = 0;

  // Indicates if options dialog related to the button specified should be
  // shown.
  virtual bool ShouldOpenButtonOptions(
      const views::View* button_view) const = 0;

  // Opens options dialog related to the button specified.
  virtual void OpenButtonOptions(const views::View* button_view) const = 0;

  // Executes browser command.
  virtual void ExecuteBrowserCommand(int id) const = 0;

  // True if status area hosted in browser. Otherwise it's OOBE/login state.
  virtual bool IsBrowserMode() const = 0;

  // True if status area hosted in screen locker.
  virtual bool IsScreenLockerMode() const = 0;

 protected:
  virtual ~StatusAreaHost() {}
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_STATUS_STATUS_AREA_HOST_H_