summaryrefslogtreecommitdiffstats
path: root/ash/status_area/status_area_view.h
blob: 613b8f1fcdefc1225fcdb0889de7ecfa69d7f4aa (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
// Copyright (c) 2012 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 ASH_STATUS_AREA_STATUS_AREA_VIEW_H_
#define ASH_STATUS_AREA_STATUS_AREA_VIEW_H_
#pragma once

#include "ash/ash_export.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/views/accessible_pane_view.h"
#include "ui/views/widget/widget_delegate.h"

namespace ash {
namespace internal {

class FocusCycler;

class ASH_EXPORT StatusAreaView : public views::WidgetDelegate,
                                  public views::AccessiblePaneView {
 public:
  StatusAreaView();
  virtual ~StatusAreaView();

  // Sets the focus cycler.
  void SetFocusCyclerForTesting(const FocusCycler* focus_cycler);

  // Overridden from views::View:
  virtual gfx::Size GetPreferredSize() OVERRIDE;
  virtual views::Widget* GetWidget() OVERRIDE;
  virtual const views::Widget* GetWidget() const OVERRIDE;

  // views::WidgetDelegate overrides:
  virtual bool CanActivate() const OVERRIDE;
  virtual void DeleteDelegate() OVERRIDE;

 private:
  virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;

  SkBitmap status_mock_;
  const FocusCycler* focus_cycler_for_testing_;

  DISALLOW_COPY_AND_ASSIGN(StatusAreaView);
};

}  // namespace internal
}  // namespace ash

#endif  // ASH_STATUS_AREA_STATUS_AREA_VIEW_H_