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

Side by Side Diff: athena/content/shell/shell_app_activity.cc

Issue 587953002: [Athena: Cleanup] consolidate ChromeAppActivity and ShellAppActivity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « athena/content/shell/shell_app_activity.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "athena/content/shell/shell_app_activity.h"
6
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"
11
12 namespace athena {
13
14 ShellAppActivity::ShellAppActivity(extensions::AppWindow* app_window)
15 : AppActivity(app_window->extension_id()), app_window_(app_window) {
16 DCHECK(app_window_);
17 }
18
19 ShellAppActivity::~ShellAppActivity() {
20 app_window_->GetBaseWindow()->Close(); // Deletes |app_window_|.
21 }
22
23 views::Widget* ShellAppActivity::CreateWidget() {
24 return NULL; // Use default widget.
25 }
26
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;
34 }
35
36 } // namespace athena
OLDNEW
« no previous file with comments | « athena/content/shell/shell_app_activity.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698