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

Unified Diff: chrome/browser/chromeos/login/webui_login_view.cc

Issue 10388166: Construct a TCW for the login view's WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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/browser/chromeos/login/webui_login_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/webui_login_view.cc
===================================================================
--- chrome/browser/chromeos/login/webui_login_view.cc (revision 137201)
+++ chrome/browser/chromeos/login/webui_login_view.cc (working copy)
@@ -17,6 +17,7 @@
#include "chrome/browser/chromeos/login/webui_login_display.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/renderer_preferences_util.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/views/ash/chrome_shell_delegate.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/common/chrome_notification_types.h"
@@ -161,7 +162,17 @@
webui_login_ = new views::WebView(ProfileManager::GetDefaultProfile());
AddChildView(webui_login_);
- WebContents* web_contents = webui_login_->GetWebContents();
+ // We create the WebContents ourselves because the TCW assumes ownership of
+ // it. This should be reworked once we don't need to use the TCW here.
+ WebContents* web_contents =
+ WebContents::Create(ProfileManager::GetDefaultProfile(),
+ NULL,
+ MSG_ROUTING_NONE,
+ NULL,
+ NULL);
+ wrapper_.reset(new TabContentsWrapper(web_contents));
+ webui_login_->SetWebContents(web_contents);
+
web_contents->SetDelegate(this);
renderer_preferences_util::UpdateFromSystemSettings(
web_contents->GetMutableRendererPrefs(),
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698