| 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_COCOA_EXTENSIONS_EXTENSION_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_VIEW_MAC_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_VIEW_MAC_H_ |
| 7 | 7 |
| 8 #include <ApplicationServices/ApplicationServices.h> | 8 #include <ApplicationServices/ApplicationServices.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 static const CGFloat kMinHeight; | 45 static const CGFloat kMinHeight; |
| 46 static const CGFloat kMaxWidth; | 46 static const CGFloat kMaxWidth; |
| 47 static const CGFloat kMaxHeight; | 47 static const CGFloat kMaxHeight; |
| 48 | 48 |
| 49 ExtensionViewMac(extensions::ExtensionHost* extension_host, Browser* browser); | 49 ExtensionViewMac(extensions::ExtensionHost* extension_host, Browser* browser); |
| 50 ~ExtensionViewMac() override; | 50 ~ExtensionViewMac() override; |
| 51 | 51 |
| 52 // Sets the container for this view. | 52 // Sets the container for this view. |
| 53 void set_container(Container* container) { container_ = container; } | 53 void set_container(Container* container) { container_ = container; } |
| 54 | 54 |
| 55 // Informs the view that its containing window's frame changed. | |
| 56 void WindowFrameChanged(); | |
| 57 | |
| 58 // Create the host view, adding it as a subview of |superview|. | 55 // Create the host view, adding it as a subview of |superview|. |
| 59 void CreateWidgetHostViewIn(gfx::NativeView superview); | 56 void CreateWidgetHostViewIn(gfx::NativeView superview); |
| 60 | 57 |
| 61 // extensions::ExtensionView: | 58 // extensions::ExtensionView: |
| 62 Browser* GetBrowser() override; | 59 Browser* GetBrowser() override; |
| 63 gfx::NativeView GetNativeView() override; | 60 gfx::NativeView GetNativeView() override; |
| 64 void ResizeDueToAutoResize(content::WebContents* web_contents, | 61 void ResizeDueToAutoResize(content::WebContents* web_contents, |
| 65 const gfx::Size& new_size) override; | 62 const gfx::Size& new_size) override; |
| 66 void RenderViewCreated(content::RenderViewHost* render_view_host) override; | 63 void RenderViewCreated(content::RenderViewHost* render_view_host) override; |
| 67 void HandleKeyboardEvent( | 64 void HandleKeyboardEvent( |
| (...skipping 14 matching lines...) Expand all Loading... |
| 82 // What we should set the preferred width to once the ExtensionView has | 79 // What we should set the preferred width to once the ExtensionView has |
| 83 // loaded. | 80 // loaded. |
| 84 gfx::Size pending_preferred_size_; | 81 gfx::Size pending_preferred_size_; |
| 85 | 82 |
| 86 Container* container_; | 83 Container* container_; |
| 87 | 84 |
| 88 DISALLOW_COPY_AND_ASSIGN(ExtensionViewMac); | 85 DISALLOW_COPY_AND_ASSIGN(ExtensionViewMac); |
| 89 }; | 86 }; |
| 90 | 87 |
| 91 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_VIEW_MAC_H_ | 88 #endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_VIEW_MAC_H_ |
| OLD | NEW |