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.
5 #ifndef XWALK_TIZEN_MOBILE_UI_TIZEN_SYSTEM_INDICATOR_WIDGET_H_
6 #define XWALK_TIZEN_MOBILE_UI_TIZEN_SYSTEM_INDICATOR_WIDGET_H_
8 #include "ui/gfx/display.h"
9 #include "ui/views/widget/widget.h"
10 #include "xwalk/tizen/mobile/ui/tizen_system_indicator.h"
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 {
21 TizenSystemIndicatorWidget();
22 virtual ~TizenSystemIndicatorWidget();
24 void Initialize(aura::Window* parent);
26 // TizenSystemIndicatorWatcher::WatcherClient implementation.
27 void OnImageUpdated(const gfx::ImageSkia& img_skia) override;
29 // Apply new display configuration.
30 void SetDisplay(const gfx::Display& display);
33 scoped_ptr<TizenSystemIndicatorWatcher> watcher_;
34 scoped_ptr<TizenSystemIndicator> indicator_;
35 friend class TizenSystemIndicator;
40 #endif // XWALK_TIZEN_MOBILE_UI_TIZEN_SYSTEM_INDICATOR_WIDGET_H_