| 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" | 7 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/extension_host.h" | 9 #include "chrome/browser/extensions/extension_host.h" |
| 10 #include "content/browser/renderer_host/render_view_host.h" | 10 #include "content/browser/renderer_host/render_view_host.h" |
| 11 #include "content/browser/renderer_host/render_widget_host_view.h" | |
| 12 #include "content/browser/tab_contents/web_contents_view_mac.h" | 11 #include "content/browser/tab_contents/web_contents_view_mac.h" |
| 12 #include "content/public/browser/render_widget_host_view.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "content/public/browser/web_contents_view.h" | 14 #include "content/public/browser/web_contents_view.h" |
| 15 | 15 |
| 16 // The minimum/maximum dimensions of the popup. | 16 // The minimum/maximum dimensions of the popup. |
| 17 const CGFloat ExtensionViewMac::kMinWidth = 25.0; | 17 const CGFloat ExtensionViewMac::kMinWidth = 25.0; |
| 18 const CGFloat ExtensionViewMac::kMinHeight = 25.0; | 18 const CGFloat ExtensionViewMac::kMinHeight = 25.0; |
| 19 const CGFloat ExtensionViewMac::kMaxWidth = 800.0; | 19 const CGFloat ExtensionViewMac::kMaxWidth = 800.0; |
| 20 const CGFloat ExtensionViewMac::kMaxHeight = 600.0; | 20 const CGFloat ExtensionViewMac::kMaxHeight = 600.0; |
| 21 | 21 |
| 22 ExtensionViewMac::ExtensionViewMac(ExtensionHost* extension_host, | 22 ExtensionViewMac::ExtensionViewMac(ExtensionHost* extension_host, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 void ExtensionViewMac::ShowIfCompletelyLoaded() { | 88 void ExtensionViewMac::ShowIfCompletelyLoaded() { |
| 89 // We wait to show the ExtensionView until it has loaded, and the view has | 89 // We wait to show the ExtensionView until it has loaded, and the view has |
| 90 // actually been created. These can happen in different orders. | 90 // actually been created. These can happen in different orders. |
| 91 if (extension_host_->did_stop_loading()) { | 91 if (extension_host_->did_stop_loading()) { |
| 92 [native_view() setHidden:NO]; | 92 [native_view() setHidden:NO]; |
| 93 if (container_) | 93 if (container_) |
| 94 container_->OnExtensionViewDidShow(this); | 94 container_->OnExtensionViewDidShow(this); |
| 95 } | 95 } |
| 96 } | 96 } |
| OLD | NEW |