OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "android_webview/browser/aw_contents_client_bridge_base.h" | 5 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
6 | 6 |
7 #include "content/public/browser/browser_thread.h" | 7 #include "content/public/browser/browser_thread.h" |
8 #include "content/public/browser/render_frame_host.h" | 8 #include "content/public/browser/render_frame_host.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // static | 50 // static |
51 AwContentsClientBridgeBase* AwContentsClientBridgeBase::FromWebContents( | 51 AwContentsClientBridgeBase* AwContentsClientBridgeBase::FromWebContents( |
52 WebContents* web_contents) { | 52 WebContents* web_contents) { |
53 return UserData::GetContents(web_contents); | 53 return UserData::GetContents(web_contents); |
54 } | 54 } |
55 | 55 |
56 // static | 56 // static |
57 AwContentsClientBridgeBase* AwContentsClientBridgeBase::FromID( | 57 AwContentsClientBridgeBase* AwContentsClientBridgeBase::FromID( |
58 int render_process_id, | 58 int render_process_id, |
59 int render_frame_id) { | 59 int render_frame_id) { |
60 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 60 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
61 content::RenderFrameHost* rfh = | 61 content::RenderFrameHost* rfh = |
62 content::RenderFrameHost::FromID(render_process_id, render_frame_id); | 62 content::RenderFrameHost::FromID(render_process_id, render_frame_id); |
63 content::WebContents* web_contents = | 63 content::WebContents* web_contents = |
64 content::WebContents::FromRenderFrameHost(rfh); | 64 content::WebContents::FromRenderFrameHost(rfh); |
65 return UserData::GetContents(web_contents); | 65 return UserData::GetContents(web_contents); |
66 } | 66 } |
67 | 67 |
68 AwContentsClientBridgeBase::~AwContentsClientBridgeBase() { | 68 AwContentsClientBridgeBase::~AwContentsClientBridgeBase() { |
69 } | 69 } |
70 | 70 |
71 } // namespace android_webview | 71 } // namespace android_webview |
OLD | NEW |