| Index: chrome/browser/ui/views/apps/chrome_native_app_window_views.h
|
| diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
|
| index 6df86465edb5f81b81a370d12bff5b237d8403c6..3ea2605c026f11a05a4495a78353f42d759e0a5e 100644
|
| --- a/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
|
| +++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views.h
|
| @@ -6,6 +6,8 @@
|
| #define CHROME_BROWSER_UI_VIEWS_APPS_CHROME_NATIVE_APP_WINDOW_VIEWS_H_
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
|
| +#include "chrome/browser/ui/views/exclusive_access_bubble_views_context.h"
|
| #include "extensions/components/native_app_window/native_app_window_views.h"
|
| #include "ui/views/context_menu_controller.h"
|
|
|
| @@ -20,6 +22,8 @@ class ImmersiveFullscreenController;
|
| #endif
|
|
|
| class DesktopKeyboardCapture;
|
| +class ExclusiveAccessManager;
|
| +class ExclusiveAccessBubbleViews;
|
| class ExtensionKeybindingRegistryViews;
|
|
|
| namespace views {
|
| @@ -28,7 +32,9 @@ class MenuRunner;
|
|
|
| class ChromeNativeAppWindowViews
|
| : public native_app_window::NativeAppWindowViews,
|
| - public views::ContextMenuController {
|
| + public views::ContextMenuController,
|
| + public ExclusiveAccessContext,
|
| + public ExclusiveAccessBubbleViewsContext {
|
| public:
|
| ChromeNativeAppWindowViews();
|
| ~ChromeNativeAppWindowViews() override;
|
| @@ -47,6 +53,12 @@ class ChromeNativeAppWindowViews
|
| const extensions::AppWindow::CreateParams& create_params);
|
| virtual views::NonClientFrameView* CreateStandardDesktopAppFrame();
|
|
|
| + void Activate() override;
|
| + void Deactivate() override;
|
| + bool PreHandleKeyboardEvent(content::WebContents* source,
|
| + const content::NativeWebKeyboardEvent& event,
|
| + bool* is_keyboard_shortcut) override;
|
| +
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(ShapedAppWindowTargeterTest,
|
| ResizeInsetsWithinBounds);
|
| @@ -90,6 +102,33 @@ class ChromeNativeAppWindowViews
|
| extensions::AppWindow* app_window,
|
| const extensions::AppWindow::CreateParams& create_params) override;
|
|
|
| + // ExclusiveAccessContext
|
| + Profile* GetProfile() override;
|
| + bool IsFullscreen() const override;
|
| + bool IsFullscreenWithToolbar() override;
|
| + bool SupportsFullscreenWithToolbar() override;
|
| + void EnterFullscreen(const GURL& url,
|
| + ExclusiveAccessBubbleType bubble_type,
|
| + bool with_toolbar) override;
|
| + void ExitFullscreen() override;
|
| + void UpdateExclusiveAccessExitBubbleContent(
|
| + GURL url,
|
| + ExclusiveAccessBubbleType bubble_type) override;
|
| + content::WebContents* GetActiveWebContents() override;
|
| + void UpdateFullscreenWithToolbar(bool with_toolbar) override;
|
| + void SetMetroSnapMode(bool enable) override;
|
| + bool IsInMetroSnapMode() override;
|
| + void UpdateDownloadShelf(bool unhide) override;
|
| + // HACK:
|
| + bool UseCallbackForMouseLock() override;
|
| + bool MouseLockCallback(bool acquired) override;
|
| +
|
| + // ExclusiveAccessBubbleViewsContext
|
| + ExclusiveAccessManager* GetExclusiveAccessManager() override;
|
| + views::Widget* GetWidget() override;
|
| + bool IsImmersiveModeEnabled() override;
|
| + gfx::Rect GetTopContainerBoundsInScreen() override;
|
| +
|
| // True if the window is fullscreen or fullscreen is pending.
|
| bool is_fullscreen_;
|
|
|
| @@ -119,6 +158,11 @@ class ChromeNativeAppWindowViews
|
|
|
| // Used to capture all keyboard events including task switching sequence.
|
| scoped_ptr<DesktopKeyboardCapture> desktop_keyboard_capture_;
|
| + bool key_capture_requested_;
|
| +
|
| + // USed to show and control exclusive access bubble.
|
| + scoped_ptr<ExclusiveAccessManager> exclusive_access_manager_;
|
| + scoped_ptr<ExclusiveAccessBubbleViews> exclusive_access_bubble_views_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ChromeNativeAppWindowViews);
|
| };
|
|
|