Upstream version 11.39.256.0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / browser / ui / native_app_window_aura.h
1 // Copyright (c) 2014 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_RUNTIME_BROWSER_UI_NATIVE_APP_WINDOW_AURA_H_
6 #define XWALK_RUNTIME_BROWSER_UI_NATIVE_APP_WINDOW_AURA_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/aura/window_tree_host.h"
12 #include "xwalk/runtime/browser/ui/native_app_window.h"
13
14 namespace aura {
15 namespace client {
16 class DefaultCaptureClient;
17 class FocusClient;
18 class WindowTreeClient;
19 }
20 }
21
22 namespace gfx {
23 class Size;
24 }
25
26 namespace ui {
27 class EventHandler;
28 }
29
30 namespace wm {
31 class CursorManager;
32 }
33
34 namespace xwalk {
35
36 class TopViewLayout;
37
38 class NativeAppWindowAura : public NativeAppWindow {
39  public:
40   explicit NativeAppWindowAura(const NativeAppWindow::CreateParams& params);
41   virtual ~NativeAppWindowAura();
42
43   // NativeAppWindow implementation.
44   virtual gfx::NativeWindow GetNativeWindow() const override;
45   virtual void UpdateIcon(const gfx::Image& icon) override;
46   virtual void UpdateTitle(const base::string16& title) override;
47   virtual gfx::Rect GetRestoredBounds() const override;
48   virtual gfx::Rect GetBounds() const override;
49   virtual void SetBounds(const gfx::Rect& bounds) override;
50   virtual void Focus() override;
51   virtual void Show() override;
52   virtual void Hide() override;
53   virtual void Maximize() override;
54   virtual void Minimize() override;
55   virtual void SetFullscreen(bool fullscreen) override;
56   virtual void Restore() override;
57   virtual void FlashFrame(bool flash) override;
58   virtual void Close() override;
59   virtual bool IsActive() const override;
60   virtual bool IsMaximized() const override;
61   virtual bool IsMinimized() const override;
62   virtual bool IsFullscreen() const override;
63
64  private:
65   scoped_ptr<aura::WindowTreeHost> host_;
66   scoped_ptr<aura::client::FocusClient> focus_client_;
67   scoped_ptr<wm::CursorManager> cursor_manager_;
68   scoped_ptr<aura::client::DefaultCaptureClient> capture_client_;
69   scoped_ptr<aura::client::WindowTreeClient> window_tree_client_;
70   scoped_ptr<ui::EventHandler> ime_filter_;
71
72   content::WebContents* web_contents_;
73
74   DISALLOW_COPY_AND_ASSIGN(NativeAppWindowAura);
75 };
76
77 }  // namespace xwalk
78
79 #endif  // XWALK_RUNTIME_BROWSER_UI_NATIVE_APP_WINDOW_AURA_H_