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

Side by Side Diff: android_webview/browser/aw_content_browser_client.cc

Issue 142923005: Allow MessageFilters to restrict listening to specific message classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 9 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 | « no previous file | build/android/pylib/gtest/filter/ipc_tests_disabled » ('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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/gtest/filter/ipc_tests_disabled » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698