| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/base_window.h" | 8 #include "chrome/browser/ui/base_window.h" |
| 9 #include "chrome/browser/ui/extensions/native_shell_window.h" | 9 #include "chrome/browser/ui/extensions/native_shell_window.h" |
| 10 #include "chrome/browser/ui/extensions/shell_window.h" | 10 #include "chrome/browser/ui/extensions/shell_window.h" |
| 11 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" | 11 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" |
| 12 #include "third_party/skia/include/core/SkRegion.h" | 12 #include "third_party/skia/include/core/SkRegion.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
| 15 #include "ui/views/widget/widget_delegate.h" | 15 #include "ui/views/widget/widget_delegate.h" |
| 16 | 16 |
| 17 class ExtensionKeybindingRegistryViews; | 17 class ExtensionKeybindingRegistryViews; |
| 18 class Profile; | 18 class Profile; |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class WebContents; | 21 class WebContents; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace extensions { | 24 namespace extensions { |
| 25 class Extension; | 25 class Extension; |
| 26 struct DraggableRegion; | |
| 27 } | 26 } |
| 28 | 27 |
| 29 namespace views { | 28 namespace views { |
| 30 class WebView; | 29 class WebView; |
| 31 } | 30 } |
| 32 | 31 |
| 33 class ShellWindowViews : public NativeShellWindow, | 32 class ShellWindowViews : public NativeShellWindow, |
| 34 public views::WidgetDelegateView { | 33 public views::WidgetDelegateView { |
| 35 public: | 34 public: |
| 36 ShellWindowViews(ShellWindow* shell_window, | 35 ShellWindowViews(ShellWindow* shell_window, |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 102 |
| 104 virtual ~ShellWindowViews(); | 103 virtual ~ShellWindowViews(); |
| 105 | 104 |
| 106 // NativeShellWindow implementation. | 105 // NativeShellWindow implementation. |
| 107 virtual void SetFullscreen(bool fullscreen) OVERRIDE; | 106 virtual void SetFullscreen(bool fullscreen) OVERRIDE; |
| 108 virtual bool IsFullscreenOrPending() const OVERRIDE; | 107 virtual bool IsFullscreenOrPending() const OVERRIDE; |
| 109 virtual void UpdateWindowIcon() OVERRIDE; | 108 virtual void UpdateWindowIcon() OVERRIDE; |
| 110 virtual void UpdateWindowTitle() OVERRIDE; | 109 virtual void UpdateWindowTitle() OVERRIDE; |
| 111 virtual void UpdateDraggableRegions( | 110 virtual void UpdateDraggableRegions( |
| 112 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; | 111 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; |
| 113 virtual void UpdateLegacyDraggableRegions( | |
| 114 const std::vector<extensions::DraggableRegion>& regions) OVERRIDE; | |
| 115 virtual void HandleKeyboardEvent( | 112 virtual void HandleKeyboardEvent( |
| 116 const content::NativeWebKeyboardEvent& event) OVERRIDE; | 113 const content::NativeWebKeyboardEvent& event) OVERRIDE; |
| 117 | 114 |
| 118 void OnViewWasResized(); | 115 void OnViewWasResized(); |
| 119 | 116 |
| 120 ShellWindow* shell_window_; // weak - ShellWindow owns NativeShellWindow. | 117 ShellWindow* shell_window_; // weak - ShellWindow owns NativeShellWindow. |
| 121 | 118 |
| 122 views::WebView* web_view_; | 119 views::WebView* web_view_; |
| 123 views::Widget* window_; | 120 views::Widget* window_; |
| 124 bool is_fullscreen_; | 121 bool is_fullscreen_; |
| 125 | 122 |
| 126 scoped_ptr<SkRegion> draggable_region_; | 123 scoped_ptr<SkRegion> draggable_region_; |
| 127 | 124 |
| 128 bool frameless_; | 125 bool frameless_; |
| 129 gfx::Size minimum_size_; | 126 gfx::Size minimum_size_; |
| 130 gfx::Size maximum_size_; | 127 gfx::Size maximum_size_; |
| 131 | 128 |
| 132 // The class that registers for keyboard shortcuts for extension commands. | 129 // The class that registers for keyboard shortcuts for extension commands. |
| 133 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; | 130 scoped_ptr<ExtensionKeybindingRegistryViews> extension_keybinding_registry_; |
| 134 | 131 |
| 135 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; | 132 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; |
| 136 | 133 |
| 137 DISALLOW_COPY_AND_ASSIGN(ShellWindowViews); | 134 DISALLOW_COPY_AND_ASSIGN(ShellWindowViews); |
| 138 }; | 135 }; |
| 139 | 136 |
| 140 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ | 137 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_SHELL_WINDOW_VIEWS_H_ |
| OLD | NEW |