| 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 d8a507737735c53a30fb4767758daef5adccce2b..50eb45b6e4804f855aea7a9ef45ad9f1f8c570b7 100644
|
| --- a/athena/content/shell/shell_app_activity.cc
|
| +++ b/athena/content/shell/shell_app_activity.cc
|
| @@ -5,17 +5,25 @@
|
| #include "athena/content/shell/shell_app_activity.h"
|
|
|
| #include "content/public/browser/web_contents.h"
|
| +#include "extensions/browser/app_window/app_window.h"
|
| +#include "extensions/browser/app_window/native_app_window.h"
|
| #include "extensions/shell/browser/shell_app_window.h"
|
| #include "ui/views/controls/webview/webview.h"
|
|
|
| namespace athena {
|
|
|
| +ShellAppActivity::ShellAppActivity(extensions::AppWindow* app_window)
|
| + : AppActivity(app_window->extension_id()), app_window_(app_window) {
|
| +}
|
| +
|
| ShellAppActivity::ShellAppActivity(extensions::ShellAppWindow* app_window,
|
| const std::string& app_id)
|
| - : AppActivity(app_id), shell_app_window_(app_window) {
|
| + : AppActivity(app_id), app_window_(NULL), shell_app_window_(app_window) {
|
| }
|
|
|
| ShellAppActivity::~ShellAppActivity() {
|
| + if (app_window_)
|
| + app_window_->GetBaseWindow()->Close(); // Deletes |app_window_|.
|
| }
|
|
|
| views::Widget* ShellAppActivity::CreateWidget() {
|
| @@ -24,6 +32,7 @@ views::Widget* ShellAppActivity::CreateWidget() {
|
|
|
| views::WebView* ShellAppActivity::GetWebView() {
|
| content::WebContents* web_contents =
|
| + app_window_ ? app_window_->web_contents() :
|
| shell_app_window_->GetAssociatedWebContents();
|
| views::WebView* web_view =
|
| new views::WebView(web_contents->GetBrowserContext());
|
|
|