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

Side by Side Diff: chrome/test/base/test_html_dialog_observer.cc

Issue 9600036: Move Render(View|Widget)Host and associated classes to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.cc ('k') | chrome/test/base/ui_test_utils.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/test/base/test_html_dialog_observer.h" 5 #include "chrome/test/base/test_html_dialog_observer.h"
6 6
7 #include "chrome/common/chrome_notification_types.h" 7 #include "chrome/common/chrome_notification_types.h"
8 #include "content/test/js_injection_ready_observer.h" 8 #include "content/test/js_injection_ready_observer.h"
9 #include "chrome/test/base/ui_test_utils.h" 9 #include "chrome/test/base/ui_test_utils.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 void TestHtmlDialogObserver::Observe( 31 void TestHtmlDialogObserver::Observe(
32 int type, 32 int type,
33 const content::NotificationSource& source, 33 const content::NotificationSource& source,
34 const content::NotificationDetails& details) { 34 const content::NotificationDetails& details) {
35 switch (type) { 35 switch (type) {
36 case chrome::NOTIFICATION_HTML_DIALOG_SHOWN: 36 case chrome::NOTIFICATION_HTML_DIALOG_SHOWN:
37 if (js_injection_ready_observer_) { 37 if (js_injection_ready_observer_) {
38 js_injection_ready_observer_->OnJsInjectionReady( 38 js_injection_ready_observer_->OnJsInjectionReady(
39 content::Details<RenderViewHost>(details).ptr()); 39 content::Details<content::RenderViewHost>(details).ptr());
40 } 40 }
41 web_ui_ = content::Source<content::WebUI>(source).ptr(); 41 web_ui_ = content::Source<content::WebUI>(source).ptr();
42 registrar_.Remove(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN, 42 registrar_.Remove(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
43 content::NotificationService::AllSources()); 43 content::NotificationService::AllSources());
44 // Wait for navigation on the new WebUI instance to complete. This depends 44 // Wait for navigation on the new WebUI instance to complete. This depends
45 // on receiving the notification of the HtmlDialog being shown before the 45 // on receiving the notification of the HtmlDialog being shown before the
46 // NavigationController finishes loading. The HtmlDialog notification is 46 // NavigationController finishes loading. The HtmlDialog notification is
47 // issued from html_dialog_ui.cc on RenderView creation which results from 47 // issued from html_dialog_ui.cc on RenderView creation which results from
48 // the call to render_manager_.Navigate in the method 48 // the call to render_manager_.Navigate in the method
49 // TabContents::NavigateToEntry. The new RenderView is later told to 49 // TabContents::NavigateToEntry. The new RenderView is later told to
(...skipping 20 matching lines...) Expand all
70 } 70 }
71 71
72 content::WebUI* TestHtmlDialogObserver::GetWebUI() { 72 content::WebUI* TestHtmlDialogObserver::GetWebUI() {
73 if (!done_) { 73 if (!done_) {
74 EXPECT_FALSE(running_); 74 EXPECT_FALSE(running_);
75 running_ = true; 75 running_ = true;
76 ui_test_utils::RunMessageLoop(); 76 ui_test_utils::RunMessageLoop();
77 } 77 }
78 return web_ui_; 78 return web_ui_;
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.cc ('k') | chrome/test/base/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698