| 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..5b9b1d756cf3fa0b74662b4dc76d074ad579ef8b 100644
|
| --- a/athena/content/shell/shell_app_activity.cc
|
| +++ b/athena/content/shell/shell_app_activity.cc
|
| @@ -4,19 +4,30 @@
|
|
|
| #include "athena/content/shell/shell_app_activity.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"
|
|
|
| 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_|.
|
| }
|
|
|
| content::WebContents* ShellAppActivity::GetWebContents() {
|
| + if (app_window_)
|
| + return app_window_->web_contents();
|
| + DCHECK(shell_app_window_);
|
| return shell_app_window_->GetAssociatedWebContents();
|
| }
|
|
|
|
|