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

Unified Diff: athena/extensions/chrome/athena_apps_client.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/web_activity.cc ('k') | athena/resource_manager/resource_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/extensions/chrome/athena_apps_client.cc
diff --git a/athena/extensions/chrome/athena_apps_client.cc b/athena/extensions/chrome/athena_apps_client.cc
index 37a0531f147a2e89ccd309e3face473f18938e97..cc0f67aa0e1d5226e2cd54e4b2fb43a3f8b979e9 100644
--- a/athena/extensions/chrome/athena_apps_client.cc
+++ b/athena/extensions/chrome/athena_apps_client.cc
@@ -17,6 +17,24 @@
#include "extensions/common/extension.h"
namespace athena {
+namespace {
+
+// A short term hack to get WebView from ChromeNativeAppWindowViews.
+// TODO(oshima): Implement athena's NativeAppWindow.
+class AthenaNativeAppWindowViews : public ChromeNativeAppWindowViews {
+ public:
+ AthenaNativeAppWindowViews() {}
+ virtual ~AthenaNativeAppWindowViews() {}
+
+ views::WebView* GetWebView() {
+ return web_view();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AthenaNativeAppWindowViews);
+};
+
+} // namespace
AthenaAppsClient::AthenaAppsClient() {
}
@@ -41,12 +59,12 @@ extensions::AppWindow* AthenaAppsClient::CreateAppWindow(
extensions::NativeAppWindow* AthenaAppsClient::CreateNativeAppWindow(
extensions::AppWindow* app_window,
const extensions::AppWindow::CreateParams& params) {
- // TODO(oshima): Implement athena's native appwindow.
- ChromeNativeAppWindowViews* window = new ChromeNativeAppWindowViews;
- window->Init(app_window, params);
- athena::ActivityManager::Get()->AddActivity(
- athena::ActivityFactory::Get()->CreateAppActivity(app_window));
- return window;
+ AthenaNativeAppWindowViews* native_window = new AthenaNativeAppWindowViews;
+ native_window->Init(app_window, params);
+ Activity* app_activity = ActivityFactory::Get()->CreateAppActivity(
+ app_window, native_window->GetWebView());
+ ActivityManager::Get()->AddActivity(app_activity);
+ return native_window;
}
void AthenaAppsClient::IncrementKeepAliveCount() {
« no previous file with comments | « athena/content/web_activity.cc ('k') | athena/resource_manager/resource_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698