Index: chrome/browser/ui/views/screensaver_extension_dialog.h |
diff --git a/chrome/browser/ui/views/screensaver_extension_dialog.h b/chrome/browser/ui/views/screensaver_extension_dialog.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c489b274caab1905cc5db6e3f6569fb8624f1707 |
--- /dev/null |
+++ b/chrome/browser/ui/views/screensaver_extension_dialog.h |
@@ -0,0 +1,58 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
sky
2012/02/24 05:03:53
2012
rkc
2012/02/25 02:14:02
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_SCREENSAVER_EXTENSION_DIALOG_H_ |
sky
2012/02/24 05:03:53
Should this class exist in chrome/browser/chromeos
rkc
2012/02/25 02:14:02
Done.
|
+#define CHROME_BROWSER_UI_VIEWS_SCREENSAVER_EXTENSION_DIALOG_H_ |
+#pragma once |
+ |
+#include "base/memory/ref_counted.h" |
+#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/ui/views/extensions/extension_dialog_observer.h" |
+ |
+class ExtensionDialog; |
+ |
+namespace browser { |
+ |
+void ShowScreensaverDialog(); |
+void CloseScreensaverDialog(); |
+ |
+} // namespace browser |
+ |
+// Shows or hides the screensaver extension in fullscreen mode on |
+// top of all other windows. |
+class ScreensaverExtensionDialog |
+ : public ExtensionDialogObserver { |
+ public: |
+ static void ShowScreensaverDialog(); |
+ static void CloseScreensaverDialog(); |
+ |
+ // ExtensionDialog::Observer implementation. |
+ virtual void ExtensionDialogClosing(ExtensionDialog* dialog) OVERRIDE; |
+ virtual void ExtensionTerminated(ExtensionDialog* dialog) OVERRIDE; |
+ |
+ protected: |
+ // ScreensaverDialog implementation. |
+ virtual void Show(); |
sky
2012/02/24 05:03:53
OVERRIDE on these two.
rkc
2012/02/25 02:14:02
Done.
|
+ virtual void Close(); |
+ |
+ private: |
+ friend class ScreensaverExtensionDialogBrowserTest; |
+ friend class ScreensaverExtensionDialogTest; |
+ |
+ explicit ScreensaverExtensionDialog(); |
sky
2012/02/24 05:03:53
no explicit
rkc
2012/02/25 02:14:02
Done.
|
+ virtual ~ScreensaverExtensionDialog(); |
+ |
+ // Load the screensaver extension. |
+ void LoadExtension(); |
+ // Reload the screensaver extension and show another screensaver dialog. |
+ void ReloadAndShow(); |
+ |
+ scoped_refptr<Extension> screensaver_extension_; |
+ // Host for the extension that implements this dialog. |
+ scoped_refptr<ExtensionDialog> extension_dialog_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ScreensaverExtensionDialog); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_SCREENSAVER_EXTENSION_DIALOG_H_ |