OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 class TabContents; |
| 19 |
| 20 class ShellWindow : public content::NotificationObserver { |
| 21 public: |
| 22 TabContents* tab_contents() const { return host_->host_contents(); } |
| 23 |
| 24 static ShellWindow* Create(Profile* profile, |
| 25 const Extension* extension, |
| 26 const GURL& url); |
| 27 |
| 28 // Closes the displayed window and invokes the destructor. |
| 29 virtual void Close() = 0; |
| 30 |
| 31 // content::NotificationObserver implementation. |
| 32 virtual void Observe(int type, |
| 33 const content::NotificationSource& source, |
| 34 const content::NotificationDetails& details) OVERRIDE; |
| 35 protected: |
| 36 explicit ShellWindow(ExtensionHost* host_); |
| 37 virtual ~ShellWindow(); |
| 38 |
| 39 scoped_ptr<ExtensionHost> host_; |
| 40 |
| 41 content::NotificationRegistrar registrar_; |
| 42 }; |
| 43 |
| 44 #endif // CHROME_BROWSER_UI_EXTENSIONS_SHELL_WINDOW_H_ |
OLD | NEW |