Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / extensions / shell / browser / shell_native_app_window.h
blob2dabbfea2dfbfc6dfbcd5cdf887837080d0927e2
1 // Copyright 2014 The Chromium Authors. 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 EXTENSIONS_SHELL_BROWSER_SHELL_NATIVE_APP_WINDOW_H_
6 #define EXTENSIONS_SHELL_BROWSER_SHELL_NATIVE_APP_WINDOW_H_
8 #include "extensions/browser/app_window/app_window.h"
9 #include "extensions/browser/app_window/native_app_window.h"
11 namespace extensions {
13 // app_shell's NativeAppWindow implementation.
14 class ShellNativeAppWindow : public NativeAppWindow {
15 public:
16 ShellNativeAppWindow(AppWindow* app_window,
17 const AppWindow::CreateParams& params);
18 ~ShellNativeAppWindow() override;
20 AppWindow* app_window() const { return app_window_; }
22 // ui::BaseView overrides:
23 bool IsMaximized() const override;
24 bool IsMinimized() const override;
25 bool IsFullscreen() const override;
26 gfx::Rect GetRestoredBounds() const override;
27 ui::WindowShowState GetRestoredState() const override;
28 void ShowInactive() override;
29 void Close() override;
30 void Maximize() override;
31 void Minimize() override;
32 void Restore() override;
33 void FlashFrame(bool flash) override;
34 bool IsAlwaysOnTop() const override;
35 void SetAlwaysOnTop(bool always_on_top) override;
37 // web_modal::ModalDialogHost overrides:
38 gfx::NativeView GetHostView() const override;
39 gfx::Point GetDialogPosition(const gfx::Size& size) override;
40 void AddObserver(web_modal::ModalDialogHostObserver* observer) override;
41 void RemoveObserver(web_modal::ModalDialogHostObserver* observer) override;
43 // web_modal::WebContentsModalDialogHost overrides:
44 gfx::Size GetMaximumDialogSize() override;
46 // NativeAppWindow overrides:
47 void SetFullscreen(int fullscreen_types) override;
48 bool IsFullscreenOrPending() const override;
49 void UpdateWindowIcon() override;
50 void UpdateWindowTitle() override;
51 void UpdateDraggableRegions(
52 const std::vector<DraggableRegion>& regions) override;
53 SkRegion* GetDraggableRegion() override;
54 void UpdateShape(scoped_ptr<SkRegion> region) override;
55 void SetInterceptAllKeys(bool want_all_keys) override;
56 void HandleKeyboardEvent(
57 const content::NativeWebKeyboardEvent& event) override;
58 bool IsFrameless() const override;
59 bool HasFrameColor() const override;
60 SkColor ActiveFrameColor() const override;
61 SkColor InactiveFrameColor() const override;
62 gfx::Insets GetFrameInsets() const override;
63 void ShowWithApp() override;
64 void HideWithApp() override;
65 gfx::Size GetContentMinimumSize() const override;
66 gfx::Size GetContentMaximumSize() const override;
67 void SetContentSizeConstraints(const gfx::Size& min_size,
68 const gfx::Size& max_size) override;
69 void SetVisibleOnAllWorkspaces(bool always_visible) override;
70 bool CanHaveAlphaEnabled() const override;
72 private:
73 AppWindow* app_window_;
75 DISALLOW_COPY_AND_ASSIGN(ShellNativeAppWindow);
78 } // namespace extensions
80 #endif // EXTENSIONS_SHELL_BROWSER_SHELL_NATIVE_APP_WINDOW_H_