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

Unified Diff: chrome/test/base/test_tab_strip_model_observer.h

Issue 12832004: content: Move all listeners of NOTIFICATION_RENDER_VIEW_HOST_CREATED out of content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | chrome/test/base/test_tab_strip_model_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/test_tab_strip_model_observer.h
diff --git a/chrome/test/base/test_tab_strip_model_observer.h b/chrome/test/base/test_tab_strip_model_observer.h
index 22a8ad5a4de190081306a056c48045b8eae35d83..f038f2529886e6e9c869b27f375b8ab6d5d9b070 100644
--- a/chrome/test/base/test_tab_strip_model_observer.h
+++ b/chrome/test/base/test_tab_strip_model_observer.h
@@ -7,10 +7,16 @@
#include "base/compiler_specific.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/test/test_navigation_observer.h"
class TabStripModel;
+namespace content {
+class JsInjectionReadyObserver;
+}
+
// In order to support testing of print preview, we need to wait for the
// constrained window to block the current tab, and then observe notifications
// on the newly added tab's controller to wait for it to be loaded.
@@ -29,6 +35,13 @@ class TestTabStripModelObserver : public content::TestNavigationObserver,
virtual ~TestTabStripModelObserver();
private:
+ class RenderViewHostInitializedObserver;
+
+ // content::NotificationObserver:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
// Callback to observer the print preview dialog associated with |contents|.
void ObservePrintPreviewDialog(content::WebContents* contents);
@@ -40,6 +53,13 @@ class TestTabStripModelObserver : public content::TestNavigationObserver,
// register this as an observer, and the destructor will remove the observer.
TabStripModel* tab_strip_model_;
+ // RenderViewHost watched for JS injection.
+ scoped_ptr<RenderViewHostInitializedObserver> rvh_observer_;
+
+ content::JsInjectionReadyObserver* injection_observer_;
+
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(TestTabStripModelObserver);
};
« no previous file with comments | « chrome/test/base/in_process_browser_test.cc ('k') | chrome/test/base/test_tab_strip_model_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698