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 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" | 5 #include "chrome/browser/ui/cocoa/extensions/extension_view_mac.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/memory/ptr_util.h" |
10 #include "chrome/browser/extensions/extension_view_host.h" | 11 #include "chrome/browser/extensions/extension_view_host.h" |
11 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" | 12 #import "chrome/browser/ui/cocoa/chrome_event_processing_window.h" |
12 #include "content/public/browser/render_view_host.h" | 13 #include "content/public/browser/render_view_host.h" |
13 #include "content/public/browser/render_widget_host.h" | 14 #include "content/public/browser/render_widget_host.h" |
14 #include "content/public/browser/render_widget_host_view.h" | 15 #include "content/public/browser/render_widget_host_view.h" |
15 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
16 #include "extensions/browser/extension_host.h" | 17 #include "extensions/browser/extension_host.h" |
17 #include "extensions/common/view_type.h" | 18 #include "extensions/common/view_type.h" |
18 | 19 |
19 // The minimum/maximum dimensions of the popup. | 20 // The minimum/maximum dimensions of the popup. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 if (extension_host_->has_loaded_once()) { | 94 if (extension_host_->has_loaded_once()) { |
94 [GetNativeView() setHidden:NO]; | 95 [GetNativeView() setHidden:NO]; |
95 if (container_) | 96 if (container_) |
96 container_->OnExtensionViewDidShow(this); | 97 container_->OnExtensionViewDidShow(this); |
97 } | 98 } |
98 } | 99 } |
99 | 100 |
100 namespace extensions { | 101 namespace extensions { |
101 | 102 |
102 // static | 103 // static |
103 scoped_ptr<ExtensionView> ExtensionViewHost::CreateExtensionView( | 104 std::unique_ptr<ExtensionView> ExtensionViewHost::CreateExtensionView( |
104 ExtensionViewHost* host, | 105 ExtensionViewHost* host, |
105 Browser* browser) { | 106 Browser* browser) { |
106 return make_scoped_ptr(new ExtensionViewMac(host, browser)); | 107 return base::WrapUnique(new ExtensionViewMac(host, browser)); |
107 } | 108 } |
108 | 109 |
109 } // namespace extensions | 110 } // namespace extensions |
OLD | NEW |