OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h" | |
10 #include "ui/views/context_menu_controller.h" | |
11 | |
12 namespace apps { | |
13 class AppWindowFrameView; | |
14 } | |
15 | |
16 namespace ash { | |
17 class ImmersiveFullscreenController; | |
18 } | |
19 | |
20 namespace views { | |
21 class MenuRunner; | |
22 } | |
23 | |
24 // Aura-specific parts of ChromeNativeAppWindowViews. This is used on Linux, | |
25 // CrOS, and Windows and implies USE_ASH. | |
26 class ChromeNativeAppWindowViewsAura : public ChromeNativeAppWindowViews, | |
27 public views::ContextMenuController { | |
28 public: | |
29 ChromeNativeAppWindowViewsAura(); | |
30 ~ChromeNativeAppWindowViewsAura() override; | |
31 | |
32 protected: | |
33 void OnBeforeWidgetInit( | |
tapted
2015/02/25 23:28:09
nit: ChromeNativeAppWindowViews implementation.
jackhou1
2015/02/25 23:47:30
Done.
| |
34 const extensions::AppWindow::CreateParams& create_params, | |
35 views::Widget::InitParams* init_params, | |
36 views::Widget* widget) override; | |
37 void OnBeforePanelWidgetInit(views::Widget::InitParams* init_params, | |
38 views::Widget* widget) override; | |
39 | |
40 // ChromeNativeAppWindowViews implementation. | |
41 apps::AppWindowFrameView* CreateNonStandardAppFrame() override; | |
42 | |
43 // ui::BaseWindow implementation. | |
44 gfx::Rect GetRestoredBounds() const override; | |
45 ui::WindowShowState GetRestoredState() const override; | |
46 bool IsAlwaysOnTop() const override; | |
47 | |
48 // views::ContextMenuController implementation. | |
49 void ShowContextMenuForView(views::View* source, | |
50 const gfx::Point& p, | |
51 ui::MenuSourceType source_type) override; | |
52 | |
53 // WidgetDelegate implementation. | |
54 views::NonClientFrameView* CreateNonClientFrameView( | |
55 views::Widget* widget) override; | |
56 | |
57 // NativeAppWindow implementation. | |
58 void SetFullscreen(int fullscreen_types) override; | |
59 void UpdateShape(scoped_ptr<SkRegion> region) override; | |
60 | |
61 private: | |
62 FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest, | |
63 ResizeInsetsWithinBounds); | |
64 | |
65 // Used to put non-frameless windows into immersive fullscreen on ChromeOS. In | |
66 // immersive fullscreen, the window header (title bar and window controls) | |
67 // slides onscreen as an overlay when the mouse is hovered at the top of the | |
68 // screen. | |
69 scoped_ptr<ash::ImmersiveFullscreenController> | |
70 immersive_fullscreen_controller_; | |
71 | |
72 #if defined(OS_CHROMEOS) | |
73 // Used to show the system menu. | |
74 scoped_ptr<views::MenuRunner> menu_runner_; | |
75 #endif | |
76 | |
77 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViewsAura); | |
78 }; | |
79 | |
80 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_AURA_H_ | |
OLD | NEW |