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

Unified Diff: athena/content/shell/shell_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/shell/shell_app_activity.h ('k') | athena/content/web_activity.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/content/shell/shell_app_activity.cc
diff --git a/athena/content/shell/shell_app_activity.cc b/athena/content/shell/shell_app_activity.cc
index 7e414e7ef59cdbb40d1d4ce7870b88b7f4ae74ce..d8a507737735c53a30fb4767758daef5adccce2b 100644
--- a/athena/content/shell/shell_app_activity.cc
+++ b/athena/content/shell/shell_app_activity.cc
@@ -4,7 +4,9 @@
#include "athena/content/shell/shell_app_activity.h"
+#include "content/public/browser/web_contents.h"
#include "extensions/shell/browser/shell_app_window.h"
+#include "ui/views/controls/webview/webview.h"
namespace athena {
@@ -16,8 +18,18 @@ ShellAppActivity::ShellAppActivity(extensions::ShellAppWindow* app_window,
ShellAppActivity::~ShellAppActivity() {
}
-content::WebContents* ShellAppActivity::GetWebContents() {
- return shell_app_window_->GetAssociatedWebContents();
+views::Widget* ShellAppActivity::CreateWidget() {
+ return NULL; // Use default widget.
+}
+
+views::WebView* ShellAppActivity::GetWebView() {
+ content::WebContents* web_contents =
+ shell_app_window_->GetAssociatedWebContents();
+ views::WebView* web_view =
+ new views::WebView(web_contents->GetBrowserContext());
+ web_view->SetWebContents(web_contents);
+ Observe(web_contents);
+ return web_view;
}
} // namespace athena
« no previous file with comments | « athena/content/shell/shell_app_activity.h ('k') | athena/content/web_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698