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.
5 #ifndef XWALK_RUNTIME_BROWSER_UI_NATIVE_APP_WINDOW_AURA_H_
6 #define XWALK_RUNTIME_BROWSER_UI_NATIVE_APP_WINDOW_AURA_H_
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"
16 class DefaultCaptureClient;
18 class WindowTreeClient;
38 class NativeAppWindowAura : public NativeAppWindow {
40 explicit NativeAppWindowAura(const NativeAppWindow::CreateParams& params);
41 virtual ~NativeAppWindowAura();
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;
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_;
72 content::WebContents* web_contents_;
74 DISALLOW_COPY_AND_ASSIGN(NativeAppWindowAura);
79 #endif // XWALK_RUNTIME_BROWSER_UI_NATIVE_APP_WINDOW_AURA_H_