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

Side by Side Diff: chrome/browser/prerender/prerender_browsertest.cc

Issue 24514003: Make BrowserMessageFilter not derive from IPC::ChannelProxy::MessageFilter. This allows us to hide … (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 2 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 | Annotate | Revision Log
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 <deque> 5 #include <deque>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 class ChannelDestructionWatcher { 143 class ChannelDestructionWatcher {
144 public: 144 public:
145 ChannelDestructionWatcher() : channel_destroyed_(false), 145 ChannelDestructionWatcher() : channel_destroyed_(false),
146 waiting_for_channel_destruction_(false) { 146 waiting_for_channel_destruction_(false) {
147 } 147 }
148 148
149 ~ChannelDestructionWatcher() { 149 ~ChannelDestructionWatcher() {
150 } 150 }
151 151
152 void WatchChannel(content::RenderProcessHost* host) { 152 void WatchChannel(content::RenderProcessHost* host) {
153 host->GetChannel()->AddFilter(new DestructionMessageFilter(this)); 153 host->AddFilter(new DestructionMessageFilter(this));
154 } 154 }
155 155
156 void WaitForChannelClose() { 156 void WaitForChannelClose() {
157 ASSERT_FALSE(waiting_for_channel_destruction_); 157 ASSERT_FALSE(waiting_for_channel_destruction_);
158 158
159 if (channel_destroyed_) 159 if (channel_destroyed_)
160 return; 160 return;
161 waiting_for_channel_destruction_ = true; 161 waiting_for_channel_destruction_ = true;
162 content::RunMessageLoop(); 162 content::RunMessageLoop();
163 163
(...skipping 2895 matching lines...) Expand 10 before | Expand all | Expand 10 after
3059 PrerenderTestURL("files/prerender/prerender_page.html", 3059 PrerenderTestURL("files/prerender/prerender_page.html",
3060 FINAL_STATUS_PAGE_BEING_CAPTURED, 1); 3060 FINAL_STATUS_PAGE_BEING_CAPTURED, 1);
3061 WebContents* web_contents = 3061 WebContents* web_contents =
3062 current_browser()->tab_strip_model()->GetActiveWebContents(); 3062 current_browser()->tab_strip_model()->GetActiveWebContents();
3063 web_contents->IncrementCapturerCount(); 3063 web_contents->IncrementCapturerCount();
3064 NavigateToDestURLWithDisposition(CURRENT_TAB, false); 3064 NavigateToDestURLWithDisposition(CURRENT_TAB, false);
3065 web_contents->DecrementCapturerCount(); 3065 web_contents->DecrementCapturerCount();
3066 } 3066 }
3067 3067
3068 } // namespace prerender 3068 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/nacl_host/nacl_host_message_filter.cc ('k') | content/browser/appcache/appcache_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698