OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "extensions/components/native_app_window/native_app_window_views.h" | 9 #include "extensions/components/native_app_window/native_app_window_views.h" |
10 #include "ui/views/context_menu_controller.h" | 10 #include "ui/views/context_menu_controller.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const extensions::AppWindow::CreateParams& create_params); | 46 const extensions::AppWindow::CreateParams& create_params); |
47 virtual views::NonClientFrameView* CreateStandardDesktopAppFrame(); | 47 virtual views::NonClientFrameView* CreateStandardDesktopAppFrame(); |
48 | 48 |
49 private: | 49 private: |
50 FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest, | 50 FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest, |
51 ResizeInsetsWithinBounds); | 51 ResizeInsetsWithinBounds); |
52 | 52 |
53 apps::AppWindowFrameView* CreateNonStandardAppFrame(); | 53 apps::AppWindowFrameView* CreateNonStandardAppFrame(); |
54 | 54 |
55 // ui::BaseWindow implementation. | 55 // ui::BaseWindow implementation. |
56 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; | 56 virtual gfx::Rect GetRestoredBounds() const override; |
57 virtual ui::WindowShowState GetRestoredState() const OVERRIDE; | 57 virtual ui::WindowShowState GetRestoredState() const override; |
58 virtual bool IsAlwaysOnTop() const OVERRIDE; | 58 virtual bool IsAlwaysOnTop() const override; |
59 | 59 |
60 // Overridden from views::ContextMenuController: | 60 // Overridden from views::ContextMenuController: |
61 virtual void ShowContextMenuForView(views::View* source, | 61 virtual void ShowContextMenuForView(views::View* source, |
62 const gfx::Point& p, | 62 const gfx::Point& p, |
63 ui::MenuSourceType source_type) OVERRIDE; | 63 ui::MenuSourceType source_type) override; |
64 | 64 |
65 // WidgetDelegate implementation. | 65 // WidgetDelegate implementation. |
66 virtual gfx::ImageSkia GetWindowAppIcon() OVERRIDE; | 66 virtual gfx::ImageSkia GetWindowAppIcon() override; |
67 virtual gfx::ImageSkia GetWindowIcon() OVERRIDE; | 67 virtual gfx::ImageSkia GetWindowIcon() override; |
68 virtual views::NonClientFrameView* CreateNonClientFrameView( | 68 virtual views::NonClientFrameView* CreateNonClientFrameView( |
69 views::Widget* widget) OVERRIDE; | 69 views::Widget* widget) override; |
70 virtual bool WidgetHasHitTestMask() const OVERRIDE; | 70 virtual bool WidgetHasHitTestMask() const override; |
71 virtual void GetWidgetHitTestMask(gfx::Path* mask) const OVERRIDE; | 71 virtual void GetWidgetHitTestMask(gfx::Path* mask) const override; |
72 | 72 |
73 // views::View implementation. | 73 // views::View implementation. |
74 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 74 virtual gfx::Size GetPreferredSize() const override; |
75 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 75 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
76 | 76 |
77 // NativeAppWindow implementation. | 77 // NativeAppWindow implementation. |
78 virtual void SetFullscreen(int fullscreen_types) OVERRIDE; | 78 virtual void SetFullscreen(int fullscreen_types) override; |
79 virtual bool IsFullscreenOrPending() const OVERRIDE; | 79 virtual bool IsFullscreenOrPending() const override; |
80 virtual void UpdateBadgeIcon() OVERRIDE; | 80 virtual void UpdateBadgeIcon() override; |
81 virtual void UpdateShape(scoped_ptr<SkRegion> region) OVERRIDE; | 81 virtual void UpdateShape(scoped_ptr<SkRegion> region) override; |
82 virtual bool HasFrameColor() const OVERRIDE; | 82 virtual bool HasFrameColor() const override; |
83 virtual SkColor ActiveFrameColor() const OVERRIDE; | 83 virtual SkColor ActiveFrameColor() const override; |
84 virtual SkColor InactiveFrameColor() const OVERRIDE; | 84 virtual SkColor InactiveFrameColor() const override; |
85 | 85 |
86 // NativeAppWindowViews implementation. | 86 // NativeAppWindowViews implementation. |
87 virtual void InitializeWindow( | 87 virtual void InitializeWindow( |
88 extensions::AppWindow* app_window, | 88 extensions::AppWindow* app_window, |
89 const extensions::AppWindow::CreateParams& create_params) OVERRIDE; | 89 const extensions::AppWindow::CreateParams& create_params) override; |
90 | 90 |
91 // True if the window is fullscreen or fullscreen is pending. | 91 // True if the window is fullscreen or fullscreen is pending. |
92 bool is_fullscreen_; | 92 bool is_fullscreen_; |
93 | 93 |
94 // Custom shape of the window. If this is not set then the window has a | 94 // Custom shape of the window. If this is not set then the window has a |
95 // default shape, usually rectangular. | 95 // default shape, usually rectangular. |
96 scoped_ptr<SkRegion> shape_; | 96 scoped_ptr<SkRegion> shape_; |
97 | 97 |
98 bool has_frame_color_; | 98 bool has_frame_color_; |
99 SkColor active_frame_color_; | 99 SkColor active_frame_color_; |
(...skipping 12 matching lines...) Expand all Loading... |
112 immersive_fullscreen_controller_; | 112 immersive_fullscreen_controller_; |
113 #endif // defined(USE_ASH) | 113 #endif // defined(USE_ASH) |
114 | 114 |
115 // Used to show the system menu. | 115 // Used to show the system menu. |
116 scoped_ptr<views::MenuRunner> menu_runner_; | 116 scoped_ptr<views::MenuRunner> menu_runner_; |
117 | 117 |
118 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); | 118 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); |
119 }; | 119 }; |
120 | 120 |
121 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ | 121 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ |
OLD | NEW |