Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/browser/ui/views/extensions/extension_view_views.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698