| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" | 5 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_host.h" | 7 #include "chrome/browser/extensions/extension_host.h" |
| 8 #include "chrome/browser/renderer_host/render_view_host.h" | |
| 9 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" | 8 #include "chrome/browser/renderer_host/render_widget_host_view_mac.h" |
| 9 #include "content/browser/renderer_host/render_view_host.h" |
| 10 | 10 |
| 11 // The minimum/maximum dimensions of the popup. | 11 // The minimum/maximum dimensions of the popup. |
| 12 const CGFloat ExtensionViewMac::kMinWidth = 25.0; | 12 const CGFloat ExtensionViewMac::kMinWidth = 25.0; |
| 13 const CGFloat ExtensionViewMac::kMinHeight = 25.0; | 13 const CGFloat ExtensionViewMac::kMinHeight = 25.0; |
| 14 const CGFloat ExtensionViewMac::kMaxWidth = 800.0; | 14 const CGFloat ExtensionViewMac::kMaxWidth = 800.0; |
| 15 const CGFloat ExtensionViewMac::kMaxHeight = 600.0; | 15 const CGFloat ExtensionViewMac::kMaxHeight = 600.0; |
| 16 | 16 |
| 17 ExtensionViewMac::ExtensionViewMac(ExtensionHost* extension_host, | 17 ExtensionViewMac::ExtensionViewMac(ExtensionHost* extension_host, |
| 18 Browser* browser) | 18 Browser* browser) |
| 19 : is_toolstrip_(true), | 19 : is_toolstrip_(true), |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 DCHECK(!render_widget_host_view_); | 106 DCHECK(!render_widget_host_view_); |
| 107 render_widget_host_view_ = new RenderWidgetHostViewMac(render_view_host()); | 107 render_widget_host_view_ = new RenderWidgetHostViewMac(render_view_host()); |
| 108 | 108 |
| 109 // The RenderWidgetHostViewMac is owned by its native view, which is created | 109 // The RenderWidgetHostViewMac is owned by its native view, which is created |
| 110 // in an autoreleased state. retain it, so that it doesn't immediately | 110 // in an autoreleased state. retain it, so that it doesn't immediately |
| 111 // disappear. | 111 // disappear. |
| 112 [render_widget_host_view_->native_view() retain]; | 112 [render_widget_host_view_->native_view() retain]; |
| 113 | 113 |
| 114 extension_host_->CreateRenderViewSoon(render_widget_host_view_); | 114 extension_host_->CreateRenderViewSoon(render_widget_host_view_); |
| 115 } | 115 } |
| OLD | NEW |