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 "android_webview/browser/aw_content_browser_client.h" | 5 #include "android_webview/browser/aw_content_browser_client.h" |
6 | 6 |
7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
8 #include "android_webview/browser/aw_browser_main_parts.h" | 8 #include "android_webview/browser/aw_browser_main_parts.h" |
9 #include "android_webview/browser/aw_contents_client_bridge_base.h" | 9 #include "android_webview/browser/aw_contents_client_bridge_base.h" |
10 #include "android_webview/browser/aw_contents_io_thread_client.h" | 10 #include "android_webview/browser/aw_contents_io_thread_client.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 private: | 62 private: |
63 virtual ~AwContentsMessageFilter(); | 63 virtual ~AwContentsMessageFilter(); |
64 | 64 |
65 int process_id_; | 65 int process_id_; |
66 | 66 |
67 DISALLOW_COPY_AND_ASSIGN(AwContentsMessageFilter); | 67 DISALLOW_COPY_AND_ASSIGN(AwContentsMessageFilter); |
68 }; | 68 }; |
69 | 69 |
70 AwContentsMessageFilter::AwContentsMessageFilter(int process_id) | 70 AwContentsMessageFilter::AwContentsMessageFilter(int process_id) |
71 : process_id_(process_id) { | 71 : BrowserMessageFilter(AndroidWebViewMsgStart), |
| 72 process_id_(process_id) { |
72 } | 73 } |
73 | 74 |
74 AwContentsMessageFilter::~AwContentsMessageFilter() { | 75 AwContentsMessageFilter::~AwContentsMessageFilter() { |
75 } | 76 } |
76 | 77 |
77 void AwContentsMessageFilter::OverrideThreadForMessage( | 78 void AwContentsMessageFilter::OverrideThreadForMessage( |
78 const IPC::Message& message, BrowserThread::ID* thread) { | 79 const IPC::Message& message, BrowserThread::ID* thread) { |
79 if (message.type() == AwViewHostMsg_ShouldOverrideUrlLoading::ID) { | 80 if (message.type() == AwViewHostMsg_ShouldOverrideUrlLoading::ID) { |
80 *thread = BrowserThread::UI; | 81 *thread = BrowserThread::UI; |
81 } | 82 } |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 WebPreferences* web_prefs) { | 492 WebPreferences* web_prefs) { |
492 if (!preferences_populater_.get()) { | 493 if (!preferences_populater_.get()) { |
493 preferences_populater_ = make_scoped_ptr(native_factory_-> | 494 preferences_populater_ = make_scoped_ptr(native_factory_-> |
494 CreateWebPreferencesPopulater()); | 495 CreateWebPreferencesPopulater()); |
495 } | 496 } |
496 preferences_populater_->PopulateFor( | 497 preferences_populater_->PopulateFor( |
497 content::WebContents::FromRenderViewHost(rvh), web_prefs); | 498 content::WebContents::FromRenderViewHost(rvh), web_prefs); |
498 } | 499 } |
499 | 500 |
500 } // namespace android_webview | 501 } // namespace android_webview |
OLD | NEW |