GN: Fix dependency output file handling.
[chromium-blink-merge.git] / athena / content / shell / shell_app_activity.cc
blobcb008e0003621f5079eceace6429b6e8c3ba431d
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "athena/content/shell/shell_app_activity.h"
7 #include "content/public/browser/web_contents.h"
8 #include "extensions/browser/app_window/app_window.h"
9 #include "extensions/browser/app_window/native_app_window.h"
10 #include "ui/views/controls/webview/webview.h"
12 namespace athena {
14 ShellAppActivity::ShellAppActivity(extensions::AppWindow* app_window)
15 : AppActivity(app_window->extension_id()), app_window_(app_window) {
16 DCHECK(app_window_);
19 ShellAppActivity::~ShellAppActivity() {
20 app_window_->GetBaseWindow()->Close(); // Deletes |app_window_|.
23 views::Widget* ShellAppActivity::CreateWidget() {
24 return NULL; // Use default widget.
27 views::WebView* ShellAppActivity::GetWebView() {
28 content::WebContents* web_contents = app_window_->web_contents();
29 views::WebView* web_view =
30 new views::WebView(web_contents->GetBrowserContext());
31 web_view->SetWebContents(web_contents);
32 Observe(web_contents);
33 return web_view;
36 } // namespace athena