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

Unified Diff: chromecast/browser/cast_content_window.cc

Issue 823763002: Seperate creation of WebContents and window tree in CastContentWindow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « chromecast/browser/cast_content_window.h ('k') | chromecast/browser/service/cast_service_simple.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chromecast/browser/cast_content_window.h ('k') | chromecast/browser/service/cast_service_simple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698