| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_SCREENSAVER_SCREENSAVER_VIEW_H_ | 5 #ifndef ASH_SCREENSAVER_SCREENSAVER_VIEW_H_ |
| 6 #define ASH_SCREENSAVER_SCREENSAVER_VIEW_H_ | 6 #define ASH_SCREENSAVER_SCREENSAVER_VIEW_H_ |
| 7 | 7 |
| 8 #include "ash/content_support/ash_with_content_export.h" | 8 #include "ash/content_support/ash_with_content_export.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "content/public/browser/web_contents_observer.h" | 10 #include "content/public/browser/web_contents_observer.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 class ScreensaverViewTest; | 25 class ScreensaverViewTest; |
| 26 } | 26 } |
| 27 | 27 |
| 28 ASH_WITH_CONTENT_EXPORT void ShowScreensaver(const GURL& url); | 28 ASH_WITH_CONTENT_EXPORT void ShowScreensaver(const GURL& url); |
| 29 ASH_WITH_CONTENT_EXPORT void CloseScreensaver(); | 29 ASH_WITH_CONTENT_EXPORT void CloseScreensaver(); |
| 30 ASH_WITH_CONTENT_EXPORT bool IsScreensaverShown(); | 30 ASH_WITH_CONTENT_EXPORT bool IsScreensaverShown(); |
| 31 | 31 |
| 32 typedef | 32 typedef |
| 33 base::Callback<views::WebView*(content::BrowserContext*)> WebViewFactory; | 33 base::Callback<views::WebView*(content::BrowserContext*)> WebViewFactory; |
| 34 | 34 |
| 35 namespace internal { | |
| 36 | |
| 37 // Shows a URL as a screensaver. The screensaver window is fullscreen, | 35 // Shows a URL as a screensaver. The screensaver window is fullscreen, |
| 38 // always on top of every other window and will reload the URL if the | 36 // always on top of every other window and will reload the URL if the |
| 39 // renderer crashes for any reason. | 37 // renderer crashes for any reason. |
| 40 class ScreensaverView : public views::WidgetDelegateView, | 38 class ScreensaverView : public views::WidgetDelegateView, |
| 41 public content::WebContentsObserver { | 39 public content::WebContentsObserver { |
| 42 public: | 40 public: |
| 43 static void ShowScreensaver(const GURL& url); | 41 static void ShowScreensaver(const GURL& url); |
| 44 static void CloseScreensaver(); | 42 static void CloseScreensaver(); |
| 45 | 43 |
| 46 static bool IsScreensaverShown(); | 44 static bool IsScreensaverShown(); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 79 |
| 82 // Host for the extension that implements this dialog. | 80 // Host for the extension that implements this dialog. |
| 83 views::WebView* screensaver_webview_; | 81 views::WebView* screensaver_webview_; |
| 84 | 82 |
| 85 // Window that holds the screensaver webview. | 83 // Window that holds the screensaver webview. |
| 86 views::Widget* container_window_; | 84 views::Widget* container_window_; |
| 87 | 85 |
| 88 DISALLOW_COPY_AND_ASSIGN(ScreensaverView); | 86 DISALLOW_COPY_AND_ASSIGN(ScreensaverView); |
| 89 }; | 87 }; |
| 90 | 88 |
| 91 } // namespace internal | |
| 92 } // namespace ash | 89 } // namespace ash |
| 93 | 90 |
| 94 #endif // ASH_SCREENSAVER_SCREENSAVER_VIEW_H_ | 91 #endif // ASH_SCREENSAVER_SCREENSAVER_VIEW_H_ |
| OLD | NEW |