Index: chromecast/browser/cast_content_window.cc |
diff --git a/chromecast/browser/cast_content_window.cc b/chromecast/browser/cast_content_window.cc |
index 8cf64b3329566d0e34f1e05f8d5e78cb4bcecaab..42f3d4e6c388cbca694657530ebab333a9ed46a9 100644 |
--- a/chromecast/browser/cast_content_window.cc |
+++ b/chromecast/browser/cast_content_window.cc |
@@ -59,9 +59,9 @@ CastContentWindow::~CastContentWindow() { |
#endif |
} |
-scoped_ptr<content::WebContents> CastContentWindow::Create( |
+void CastContentWindow::CreateWindowTree( |
const gfx::Size& initial_size, |
- content::BrowserContext* browser_context) { |
+ content::WebContents* web_contents) { |
#if defined(USE_AURA) |
// Aura initialization |
// TODO(lcwu): We only need a minimal implementation of gfx::Screen |
@@ -86,12 +86,6 @@ scoped_ptr<content::WebContents> CastContentWindow::Create( |
window_tree_host_->Show(); |
#endif |
- content::WebContents::CreateParams create_params(browser_context, NULL); |
- create_params.routing_id = MSG_ROUTING_NONE; |
- create_params.initial_size = initial_size; |
- content::WebContents* web_contents = content::WebContents::Create( |
- create_params); |
- |
#if defined(USE_AURA) |
gunsch
2014/12/23 18:25:41
merge the #ifdef blocks, this is the same conditio
|
// Add and show content's view/window |
aura::Window* content_window = web_contents->GetNativeView(); |
@@ -101,6 +95,16 @@ scoped_ptr<content::WebContents> CastContentWindow::Create( |
} |
content_window->Show(); |
#endif |
+} |
+ |
+scoped_ptr<content::WebContents> CastContentWindow::CreateWebContents( |
+ const gfx::Size& initial_size, |
+ content::BrowserContext* browser_context) { |
+ content::WebContents::CreateParams create_params(browser_context, NULL); |
+ create_params.routing_id = MSG_ROUTING_NONE; |
+ create_params.initial_size = initial_size; |
+ content::WebContents* web_contents = content::WebContents::Create( |
+ create_params); |
return make_scoped_ptr(web_contents); |
} |