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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |