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

Unified Diff: athena/content/app_activity.cc

Issue 558243002: V2 app support step2 : Use NativeAppWindow for Activity's window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comment Created 6 years, 3 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 | « athena/content/app_activity.h ('k') | athena/content/app_activity_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/content/app_activity.cc
diff --git a/athena/content/app_activity.cc b/athena/content/app_activity.cc
index 2c7dc8bcd44ba073bfca46cb9173908f70600e1b..c87ed6115196d4d8dcf4142aa8442d728b4be659 100644
--- a/athena/content/app_activity.cc
+++ b/athena/content/app_activity.cc
@@ -116,10 +116,7 @@ bool AppActivity::UsesFrame() const {
views::View* AppActivity::GetContentsView() {
if (!web_view_) {
- // TODO(oshima): use apps::NativeAppWindowViews
- content::WebContents* web_contents = GetWebContents();
- web_view_ = new views::WebView(web_contents->GetBrowserContext());
- web_view_->SetWebContents(web_contents);
+ web_view_ = GetWebView();
// Make sure the content gets properly shown.
if (current_state_ == ACTIVITY_VISIBLE) {
MakeVisible();
@@ -129,7 +126,6 @@ views::View* AppActivity::GetContentsView() {
// If not previously specified, we change the state now to invisible..
SetCurrentState(ACTIVITY_INVISIBLE);
}
- Observe(web_contents);
RegisterActivity();
}
return web_view_;
@@ -174,7 +170,7 @@ void AppActivity::DidUpdateFaviconURL(
// Note: This should only get called once for an |app_window| of the
// |activity|.
void AppActivity::RegisterActivity() {
- content::WebContents* web_contents = GetWebContents();
+ content::WebContents* web_contents = web_view_->GetWebContents();
AppRegistry* app_registry = AppRegistry::Get();
// Get the application's registry.
app_activity_registry_ = app_registry->GetAppActivityRegistry(
« no previous file with comments | « athena/content/app_activity.h ('k') | athena/content/app_activity_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698