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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « content/browser/site_instance_impl.cc ('k') | content/browser/websockets/websocket_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 5176 matching lines...) Expand 10 before | Expand all | Expand 10 after
5187 WebContentsImpl::GetJavaWebContents() { 5187 WebContentsImpl::GetJavaWebContents() {
5188 DCHECK_CURRENTLY_ON(BrowserThread::UI); 5188 DCHECK_CURRENTLY_ON(BrowserThread::UI);
5189 return GetWebContentsAndroid()->GetJavaObject(); 5189 return GetWebContentsAndroid()->GetJavaObject();
5190 } 5190 }
5191 5191
5192 WebContentsAndroid* WebContentsImpl::GetWebContentsAndroid() { 5192 WebContentsAndroid* WebContentsImpl::GetWebContentsAndroid() {
5193 WebContentsAndroid* web_contents_android = 5193 WebContentsAndroid* web_contents_android =
5194 static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey)); 5194 static_cast<WebContentsAndroid*>(GetUserData(kWebContentsAndroidKey));
5195 if (!web_contents_android) { 5195 if (!web_contents_android) {
5196 web_contents_android = new WebContentsAndroid(this); 5196 web_contents_android = new WebContentsAndroid(this);
5197 SetUserData(kWebContentsAndroidKey, web_contents_android); 5197 SetUserData(kWebContentsAndroidKey, base::WrapUnique(web_contents_android));
5198 } 5198 }
5199 return web_contents_android; 5199 return web_contents_android;
5200 } 5200 }
5201 5201
5202 void WebContentsImpl::ActivateNearestFindResult(float x, 5202 void WebContentsImpl::ActivateNearestFindResult(float x,
5203 float y) { 5203 float y) {
5204 GetOrCreateFindRequestManager()->ActivateNearestFindResult(x, y); 5204 GetOrCreateFindRequestManager()->ActivateNearestFindResult(x, y);
5205 } 5205 }
5206 5206
5207 void WebContentsImpl::RequestFindMatchRects(int current_version) { 5207 void WebContentsImpl::RequestFindMatchRects(int current_version) {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
5589 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); 5589 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host);
5590 if (!render_view_host) 5590 if (!render_view_host)
5591 continue; 5591 continue;
5592 render_view_host_set.insert(render_view_host); 5592 render_view_host_set.insert(render_view_host);
5593 } 5593 }
5594 for (RenderViewHost* render_view_host : render_view_host_set) 5594 for (RenderViewHost* render_view_host : render_view_host_set)
5595 render_view_host->OnWebkitPreferencesChanged(); 5595 render_view_host->OnWebkitPreferencesChanged();
5596 } 5596 }
5597 5597
5598 } // namespace content 5598 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_instance_impl.cc ('k') | content/browser/websockets/websocket_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698