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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.h

Issue 8985008: Don't use browser windows for platform app shell windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable platform app tests on non-GTK platforms. Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | 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 (c) 2012 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 #ifndef CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
6 #define CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/extensions/extension_host.h"
11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h"
13
14 class GURL;
15 class Extension;
16 class ExtensionHost;
17 class Profile;
18
19 namespace content {
20 class WebContents;
21 }
22
23 class ShellWindow : public content::NotificationObserver {
24 public:
25 content::WebContents* web_contents() const { return host_->host_contents(); }
26
27 static ShellWindow* Create(Profile* profile,
28 const Extension* extension,
29 const GURL& url);
30
31 // Closes the displayed window and invokes the destructor.
32 virtual void Close() = 0;
33
34 // content::NotificationObserver implementation.
35 virtual void Observe(int type,
36 const content::NotificationSource& source,
37 const content::NotificationDetails& details) OVERRIDE;
38
39 protected:
40 explicit ShellWindow(ExtensionHost* host_);
41 virtual ~ShellWindow();
42
43 // Instantiates a platform-specific ShellWindow subclass (one implementation
44 // per platform). Public users of ShellWindow should use ShellWindow::Create.
45 static ShellWindow* CreateShellWindow(ExtensionHost* host);
46
47 scoped_ptr<ExtensionHost> host_;
48
49 content::NotificationRegistrar registrar_;
50 };
51
52 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/extensions/shell_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698