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 "apps/ui/views/native_app_window_views.h" | 8 #include "apps/ui/views/native_app_window_views.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/views/context_menu_controller.h" | 10 #include "ui/views/context_menu_controller.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 SkRegion* shape() { return shape_.get(); } | 30 SkRegion* shape() { return shape_.get(); } |
31 | 31 |
32 protected: | 32 protected: |
33 // Called before views::Widget::Init() to allow subclasses to customize | 33 // Called before views::Widget::Init() to allow subclasses to customize |
34 // the InitParams that would be passed. | 34 // the InitParams that would be passed. |
35 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, | 35 virtual void OnBeforeWidgetInit(views::Widget::InitParams* init_params, |
36 views::Widget* widget); | 36 views::Widget* widget); |
37 | 37 |
38 virtual void InitializeDefaultWindow( | 38 virtual void InitializeDefaultWindow( |
39 const apps::AppWindow::CreateParams& create_params); | 39 const extensions::AppWindow::CreateParams& create_params); |
40 virtual void InitializePanelWindow( | 40 virtual void InitializePanelWindow( |
41 const apps::AppWindow::CreateParams& create_params); | 41 const extensions::AppWindow::CreateParams& create_params); |
42 virtual views::NonClientFrameView* CreateStandardDesktopAppFrame(); | 42 virtual views::NonClientFrameView* CreateStandardDesktopAppFrame(); |
43 | 43 |
44 private: | 44 private: |
45 FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest, | 45 FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest, |
46 ResizeInsetsWithinBounds); | 46 ResizeInsetsWithinBounds); |
47 | 47 |
48 apps::AppWindowFrameView* CreateNonStandardAppFrame(); | 48 apps::AppWindowFrameView* CreateNonStandardAppFrame(); |
49 | 49 |
50 // ui::BaseWindow implementation. | 50 // ui::BaseWindow implementation. |
51 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; | 51 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; |
(...skipping 21 matching lines...) Expand all Loading... |
73 virtual void SetFullscreen(int fullscreen_types) OVERRIDE; | 73 virtual void SetFullscreen(int fullscreen_types) OVERRIDE; |
74 virtual bool IsFullscreenOrPending() const OVERRIDE; | 74 virtual bool IsFullscreenOrPending() const OVERRIDE; |
75 virtual void UpdateBadgeIcon() OVERRIDE; | 75 virtual void UpdateBadgeIcon() OVERRIDE; |
76 virtual void UpdateShape(scoped_ptr<SkRegion> region) OVERRIDE; | 76 virtual void UpdateShape(scoped_ptr<SkRegion> region) OVERRIDE; |
77 virtual bool HasFrameColor() const OVERRIDE; | 77 virtual bool HasFrameColor() const OVERRIDE; |
78 virtual SkColor ActiveFrameColor() const OVERRIDE; | 78 virtual SkColor ActiveFrameColor() const OVERRIDE; |
79 virtual SkColor InactiveFrameColor() const OVERRIDE; | 79 virtual SkColor InactiveFrameColor() const OVERRIDE; |
80 | 80 |
81 // NativeAppWindowViews implementation. | 81 // NativeAppWindowViews implementation. |
82 virtual void InitializeWindow( | 82 virtual void InitializeWindow( |
83 apps::AppWindow* app_window, | 83 extensions::AppWindow* app_window, |
84 const apps::AppWindow::CreateParams& create_params) OVERRIDE; | 84 const extensions::AppWindow::CreateParams& create_params) OVERRIDE; |
85 | 85 |
86 // True if the window is fullscreen or fullscreen is pending. | 86 // True if the window is fullscreen or fullscreen is pending. |
87 bool is_fullscreen_; | 87 bool is_fullscreen_; |
88 | 88 |
89 // Custom shape of the window. If this is not set then the window has a | 89 // Custom shape of the window. If this is not set then the window has a |
90 // default shape, usually rectangular. | 90 // default shape, usually rectangular. |
91 scoped_ptr<SkRegion> shape_; | 91 scoped_ptr<SkRegion> shape_; |
92 | 92 |
93 bool has_frame_color_; | 93 bool has_frame_color_; |
94 SkColor active_frame_color_; | 94 SkColor active_frame_color_; |
(...skipping 12 matching lines...) Expand all Loading... |
107 immersive_fullscreen_controller_; | 107 immersive_fullscreen_controller_; |
108 #endif // defined(USE_ASH) | 108 #endif // defined(USE_ASH) |
109 | 109 |
110 // Used to show the system menu. | 110 // Used to show the system menu. |
111 scoped_ptr<views::MenuRunner> menu_runner_; | 111 scoped_ptr<views::MenuRunner> menu_runner_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); | 113 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); |
114 }; | 114 }; |
115 | 115 |
116 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ | 116 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ |
OLD | NEW |