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

Unified Diff: content/shell/shell.h

Issue 10831056: Port the render_view_host_manager_browsertest.cc to content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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
Index: content/shell/shell.h
===================================================================
--- content/shell/shell.h (revision 148713)
+++ content/shell/shell.h (working copy)
@@ -9,6 +9,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"
#include "base/string_piece.h"
#include "content/public/browser/notification_registrar.h"
@@ -72,6 +73,10 @@
// Closes all windows and exits.
static void PlatformExit();
+ // Used for content_browsertests. Called once.
+ static void SetShellCreatedCallback(
+ base::Callback<void(Shell*)> shell_created_callback);
+
WebContents* web_contents() const { return web_contents_.get(); }
gfx::NativeWindow window() { return window_; }
@@ -85,10 +90,13 @@
#endif
// WebContentsDelegate
+ virtual WebContents* OpenURLFromTab(WebContents* source,
+ const OpenURLParams& params) OVERRIDE;
virtual void LoadingStateChanged(WebContents* source) OVERRIDE;
#if defined(OS_ANDROID)
virtual void LoadProgressChanged(double progress) OVERRIDE;
#endif
+ virtual void CloseContents(WebContents* source) OVERRIDE;
virtual void WebContentsCreated(WebContents* source_contents,
int64 source_frame_id,
const GURL& target_url,
@@ -201,6 +209,8 @@
// of ordering.
static std::vector<Shell*> windows_;
+ static base::Callback<void(Shell*)> shell_created_callback_;
+
// True if the destructur of Shell should post a quit closure on the current
// message loop if the destructed Shell object was the last one.
static bool quit_message_loop_;

Powered by Google App Engine
This is Rietveld 408576698