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

Side by Side Diff: chrome/browser/chromeos/ui/screensaver_extension_dialog.h

Issue 9455038: Screensaver at login screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review changes. Created 8 years, 10 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
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_CHROMEOS_UI_SCREENSAVER_EXTENSION_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_UI_SCREENSAVER_EXTENSION_DIALOG_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/views/extensions/extension_dialog_observer.h"
12
13 class Extension;
14 class ExtensionDialog;
15
16 namespace browser {
17
18 void ShowScreensaverDialog();
19 void CloseScreensaverDialog();
20
21 } // namespace browser
22
23 // Shows or hides the screensaver extension in fullscreen mode on
24 // top of all other windows.
25 class ScreensaverExtensionDialog
26 : public ExtensionDialogObserver {
27 public:
28 static void ShowScreensaverDialog();
29 static void CloseScreensaverDialog();
30
31 // ExtensionDialog::Observer implementation.
32 virtual void ExtensionDialogClosing(ExtensionDialog* dialog) OVERRIDE;
33 virtual void ExtensionTerminated(ExtensionDialog* dialog) OVERRIDE;
34
35 protected:
36 // ScreensaverDialog implementation.
37 virtual void Show() OVERRIDE;
38 virtual void Close() OVERRIDE;
39
40 private:
41 friend class ScreensaverExtensionDialogBrowserTest;
42 friend class ScreensaverExtensionDialogTest;
43
44 ScreensaverExtensionDialog();
45 virtual ~ScreensaverExtensionDialog();
46
47 // Load the screensaver extension.
48 void LoadExtension();
49 // Callback to set the extension and show the dialog.
50 // Called from LoadExtension.
51 void SetExtensionAndShow(scoped_refptr<Extension> extension);
52 // Reload the screensaver extension and show another screensaver dialog.
53 void ReloadAndShow();
54
55 scoped_refptr<Extension> screensaver_extension_;
56 // Host for the extension that implements this dialog.
57 scoped_refptr<ExtensionDialog> extension_dialog_;
58
59 // Set while we're loading an extension; only touched from the UI thread.
60 bool loading_extension_;
61
62 DISALLOW_COPY_AND_ASSIGN(ScreensaverExtensionDialog);
63 };
64
65 #endif // CHROME_BROWSER_CHROMEOS_UI_SCREENSAVER_EXTENSION_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698