| 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" |
| 11 | 11 |
| 12 namespace apps { | 12 namespace apps { |
| 13 class AppWindowFrameView; | 13 class AppWindowFrameView; |
| 14 } | 14 } |
| 15 | 15 |
| 16 #if defined(USE_ASH) | 16 #if defined(USE_ASH) |
| 17 namespace ash { | 17 namespace ash { |
| 18 class ImmersiveFullscreenController; | 18 class ImmersiveFullscreenController; |
| 19 } | 19 } |
| 20 #endif | 20 #endif |
| 21 | 21 |
| 22 class DesktopKeyboardCapture; |
| 22 class ExtensionKeybindingRegistryViews; | 23 class ExtensionKeybindingRegistryViews; |
| 23 | 24 |
| 24 namespace views { | 25 namespace views { |
| 25 class MenuRunner; | 26 class MenuRunner; |
| 26 } | 27 } |
| 27 | 28 |
| 28 class ChromeNativeAppWindowViews | 29 class ChromeNativeAppWindowViews |
| 29 : public native_app_window::NativeAppWindowViews, | 30 : public native_app_window::NativeAppWindowViews, |
| 30 public views::ContextMenuController { | 31 public views::ContextMenuController { |
| 31 public: | 32 public: |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; | 76 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; |
| 76 | 77 |
| 77 // NativeAppWindow implementation. | 78 // NativeAppWindow implementation. |
| 78 void SetFullscreen(int fullscreen_types) override; | 79 void SetFullscreen(int fullscreen_types) override; |
| 79 bool IsFullscreenOrPending() const override; | 80 bool IsFullscreenOrPending() const override; |
| 80 void UpdateBadgeIcon() override; | 81 void UpdateBadgeIcon() override; |
| 81 void UpdateShape(scoped_ptr<SkRegion> region) override; | 82 void UpdateShape(scoped_ptr<SkRegion> region) override; |
| 82 bool HasFrameColor() const override; | 83 bool HasFrameColor() const override; |
| 83 SkColor ActiveFrameColor() const override; | 84 SkColor ActiveFrameColor() const override; |
| 84 SkColor InactiveFrameColor() const override; | 85 SkColor InactiveFrameColor() const override; |
| 86 virtual void SetInterceptAllKeys(bool want_all_keys) override; |
| 85 | 87 |
| 86 // NativeAppWindowViews implementation. | 88 // NativeAppWindowViews implementation. |
| 87 void InitializeWindow( | 89 void InitializeWindow( |
| 88 extensions::AppWindow* app_window, | 90 extensions::AppWindow* app_window, |
| 89 const extensions::AppWindow::CreateParams& create_params) override; | 91 const extensions::AppWindow::CreateParams& create_params) override; |
| 90 | 92 |
| 91 // True if the window is fullscreen or fullscreen is pending. | 93 // True if the window is fullscreen or fullscreen is pending. |
| 92 bool is_fullscreen_; | 94 bool is_fullscreen_; |
| 93 | 95 |
| 94 // Custom shape of the window. If this is not set then the window has a | 96 // Custom shape of the window. If this is not set then the window has a |
| (...skipping 13 matching lines...) Expand all Loading... |
| 108 // immersive fullscreen, the window header (title bar and window controls) | 110 // immersive fullscreen, the window header (title bar and window controls) |
| 109 // slides onscreen as an overlay when the mouse is hovered at the top of the | 111 // slides onscreen as an overlay when the mouse is hovered at the top of the |
| 110 // screen. | 112 // screen. |
| 111 scoped_ptr<ash::ImmersiveFullscreenController> | 113 scoped_ptr<ash::ImmersiveFullscreenController> |
| 112 immersive_fullscreen_controller_; | 114 immersive_fullscreen_controller_; |
| 113 #endif // defined(USE_ASH) | 115 #endif // defined(USE_ASH) |
| 114 | 116 |
| 115 // Used to show the system menu. | 117 // Used to show the system menu. |
| 116 scoped_ptr<views::MenuRunner> menu_runner_; | 118 scoped_ptr<views::MenuRunner> menu_runner_; |
| 117 | 119 |
| 120 // Used to capture all keyboard events including task switching sequence. |
| 121 scoped_ptr<DesktopKeyboardCapture> desktop_keyboard_capture_; |
| 122 |
| 118 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); | 123 DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews); |
| 119 }; | 124 }; |
| 120 | 125 |
| 121 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ | 126 #endif // CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_ |
| OLD | NEW |