Chromium Code Reviews| 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 { |
|
Jun Mukai
2014/09/10 23:53:14
For the follow-ups of outlined comment:
Noticed th
oshima
2014/09/11 00:20:56
ActivityFrame view is in athena/activity, and requ
|
| + public: |
| + AthenaNativeAppWindowViews() {} |
| + virtual ~AthenaNativeAppWindowViews() {} |
| + |
| + views::WebView* GetWebView() { |
|
Jun Mukai
2014/09/10 23:58:11
Do you need to expose this?
You may want to pass a
oshima
2014/09/11 00:20:56
I tried that first, but it added extra dependency
|
| + 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() { |