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_; |