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

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

Issue 10191010: Re-implement the screensaver to use WebView instead of ExtensionDialogHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ut fix. Created 8 years, 7 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(scoped_refptr<Extension> extension);
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 : public ExtensionDialogObserver {
26 public:
27 static void ShowScreensaverDialog(scoped_refptr<Extension> extension);
28 static void CloseScreensaverDialog();
29
30 // ExtensionDialog::Observer implementation.
31 virtual void ExtensionDialogClosing(ExtensionDialog* dialog) OVERRIDE;
32 virtual void ExtensionTerminated(ExtensionDialog* dialog) OVERRIDE;
33
34 protected:
35 virtual void Show();
36 virtual void Close();
37
38 private:
39 friend class ScreensaverExtensionDialogBrowserTest;
40 friend class ScreensaverExtensionDialogTest;
41
42 explicit ScreensaverExtensionDialog(scoped_refptr<Extension> extension);
43 virtual ~ScreensaverExtensionDialog();
44
45 // Reload the screensaver extension and show another screensaver dialog.
46 void ReloadAndShow();
47
48 scoped_refptr<Extension> screensaver_extension_;
49 // Host for the extension that implements this dialog.
50 scoped_refptr<ExtensionDialog> extension_dialog_;
51
52 // Set while we're loading an extension; only touched from the UI thread.
53 bool loading_extension_;
54
55 DISALLOW_COPY_AND_ASSIGN(ScreensaverExtensionDialog);
56 };
57
58 #endif // CHROME_BROWSER_CHROMEOS_UI_SCREENSAVER_EXTENSION_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698