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/views/extensions/extension_view_views.h" | 5 #include "chrome/browser/ui/views/extensions/extension_view_views.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "chrome/browser/extensions/extension_view_host.h" | 9 #include "chrome/browser/extensions/extension_view_host.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 | 129 |
130 void ExtensionViewViews::OnWebContentsAttached() { | 130 void ExtensionViewViews::OnWebContentsAttached() { |
131 host_->CreateRenderViewSoon(); | 131 host_->CreateRenderViewSoon(); |
132 SetVisible(false); | 132 SetVisible(false); |
133 } | 133 } |
134 | 134 |
135 namespace extensions { | 135 namespace extensions { |
136 | 136 |
137 // static | 137 // static |
138 scoped_ptr<ExtensionView> ExtensionViewHost::CreateExtensionView( | 138 std::unique_ptr<ExtensionView> ExtensionViewHost::CreateExtensionView( |
139 ExtensionViewHost* host, | 139 ExtensionViewHost* host, |
140 Browser* browser) { | 140 Browser* browser) { |
141 scoped_ptr<ExtensionViewViews> view(new ExtensionViewViews(host, browser)); | 141 std::unique_ptr<ExtensionViewViews> view( |
| 142 new ExtensionViewViews(host, browser)); |
142 // We own |view_|, so don't auto delete when it's removed from the view | 143 // We own |view_|, so don't auto delete when it's removed from the view |
143 // hierarchy. | 144 // hierarchy. |
144 view->set_owned_by_client(); | 145 view->set_owned_by_client(); |
145 return std::move(view); | 146 return std::move(view); |
146 } | 147 } |
147 | 148 |
148 } // namespace extensions | 149 } // namespace extensions |
OLD | NEW |