Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / xwalk / tizen / mobile / ui / tizen_system_indicator_widget.h
1 // Copyright (c) 2013 Intel Corporation. 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 XWALK_TIZEN_MOBILE_UI_TIZEN_SYSTEM_INDICATOR_WIDGET_H_
6 #define XWALK_TIZEN_MOBILE_UI_TIZEN_SYSTEM_INDICATOR_WIDGET_H_
7
8 #include "ui/gfx/display.h"
9 #include "ui/views/widget/widget.h"
10 #include "xwalk/tizen/mobile/ui/tizen_system_indicator.h"
11
12 namespace xwalk {
13
14 // In Tizen the system indicator is shown by each application. This widget draws
15 // the indicator for Crosswalk by waiting for new images from the system (using
16 // TizenSystemIndicatorWatcher, that uses elm_plug protocol) and setting them
17 // into the TizenSystemIndicator view, which is the only content of the widget.
18 class TizenSystemIndicatorWidget : public views::Widget,
19     public TizenSystemIndicatorWatcher::WatcherClient {
20  public:
21   TizenSystemIndicatorWidget();
22   virtual ~TizenSystemIndicatorWidget();
23
24   void Initialize(aura::Window* parent);
25
26   // TizenSystemIndicatorWatcher::WatcherClient implementation.
27   void OnImageUpdated(const gfx::ImageSkia& img_skia) override;
28
29   // Apply new display configuration.
30   void SetDisplay(const gfx::Display& display);
31
32  private:
33   scoped_ptr<TizenSystemIndicatorWatcher> watcher_;
34   scoped_ptr<TizenSystemIndicator> indicator_;
35   friend class TizenSystemIndicator;
36 };
37
38 }  // namespace xwalk
39
40 #endif  // XWALK_TIZEN_MOBILE_UI_TIZEN_SYSTEM_INDICATOR_WIDGET_H_