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

Side by Side Diff: chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc

Issue 1411203010: Separate RenderViewHost from RenderWidgetHost, part 4: delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 5 years, 1 month 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
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/process/process.h" 7 #include "base/process/process.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/devtools/devtools_window.h" 10 #include "chrome/browser/devtools/devtools_window.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 return count; 48 return count;
49 } 49 }
50 50
51 WebContents* FindFirstDevToolsContents() { 51 WebContents* FindFirstDevToolsContents() {
52 scoped_ptr<content::RenderWidgetHostIterator> widgets( 52 scoped_ptr<content::RenderWidgetHostIterator> widgets(
53 RenderWidgetHost::GetRenderWidgetHosts()); 53 RenderWidgetHost::GetRenderWidgetHosts());
54 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { 54 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) {
55 if (!widget->GetProcess()->HasConnection()) 55 if (!widget->GetProcess()->HasConnection())
56 continue; 56 continue;
57 if (!widget->IsRenderView()) 57 RenderViewHost* view_host = RenderViewHost::From(widget);
58 if (!view_host)
58 continue; 59 continue;
59 RenderViewHost* host = RenderViewHost::From(widget); 60 WebContents* contents = WebContents::FromRenderViewHost(view_host);
60 WebContents* contents = WebContents::FromRenderViewHost(host);
61 GURL url = contents->GetURL(); 61 GURL url = contents->GetURL();
62 if (url.SchemeIs(content::kChromeDevToolsScheme)) 62 if (url.SchemeIs(content::kChromeDevToolsScheme))
63 return contents; 63 return contents;
64 } 64 }
65 return NULL; 65 return NULL;
66 } 66 }
67 67
68 // TODO(rvargas) crbug.com/417532: Remove this code. 68 // TODO(rvargas) crbug.com/417532: Remove this code.
69 base::Process ProcessFromHandle(base::ProcessHandle handle) { 69 base::Process ProcessFromHandle(base::ProcessHandle handle) {
70 #if defined(OS_WIN) 70 #if defined(OS_WIN)
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 content::ExecuteScript(audio_tab_web_contents_, 677 content::ExecuteScript(audio_tab_web_contents_,
678 "document.getElementById('audioPlayer').play();")); 678 "document.getElementById('audioPlayer').play();"));
679 679
680 // Wait until the two pages are not backgrounded. 680 // Wait until the two pages are not backgrounded.
681 while (no_audio_process_.IsProcessBackgrounded() || 681 while (no_audio_process_.IsProcessBackgrounded() ||
682 audio_process_.IsProcessBackgrounded()) { 682 audio_process_.IsProcessBackgrounded()) {
683 base::RunLoop().RunUntilIdle(); 683 base::RunLoop().RunUntilIdle();
684 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); 684 base::PlatformThread::Sleep(TestTimeouts::tiny_timeout());
685 } 685 }
686 } 686 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698