Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_SCREENSHOT_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_WEB_CONTENTS_SCREENSHOT_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_SCREENSHOT_MANAGER_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_WEB_CONTENTS_SCREENSHOT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 | 12 |
| 13 class SkBitmap; | 13 class SkBitmap; |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 | 16 |
| 17 class NavigationControllerImpl; | 17 class NavigationControllerImpl; |
| 18 class NavigationEntryImpl; | 18 class NavigationEntryImpl; |
| 19 class RenderViewHost; | 19 class RenderViewHost; |
| 20 class ScreenshotData; | 20 class ScreenshotData; |
| 21 | 21 |
| 22 // WebContentsScreenshotManager takes care of taking image-captures for the | 22 // WebContentsScreenshotManager takes care of taking image-captures for the |
| 23 // current navigation entry of a NavigationControllerImpl, and managing these | 23 // current navigation entry of a NavigationControllerImpl, and managing these |
| 24 // captured images. These image-captures are used for history navigation using | 24 // captured images. These image-captures are used for history navigation using |
| 25 // overscroll gestures. | 25 // overscroll gestures. |
| 26 class CONTENT_EXPORT WebContentsScreenshotManager { | 26 class CONTENT_EXPORT WebContentsScreenshotManager { |
|
Charlie Reis
2013/10/29 16:36:39
Let's add a TODO to rename this to something like
nasko
2013/10/29 16:47:22
Done.
| |
| 27 public: | 27 public: |
| 28 explicit WebContentsScreenshotManager(NavigationControllerImpl* controller); | 28 explicit WebContentsScreenshotManager(NavigationControllerImpl* controller); |
| 29 virtual ~WebContentsScreenshotManager(); | 29 virtual ~WebContentsScreenshotManager(); |
| 30 | 30 |
| 31 // Takes a screenshot of the last-committed entry of the controller. | 31 // Takes a screenshot of the last-committed entry of the controller. |
| 32 void TakeScreenshot(); | 32 void TakeScreenshot(); |
| 33 | 33 |
| 34 // Clears screenshots of all navigation entries. | 34 // Clears screenshots of all navigation entries. |
| 35 void ClearAllScreenshots(); | 35 void ClearAllScreenshots(); |
| 36 | 36 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 base::WeakPtrFactory<WebContentsScreenshotManager> screenshot_factory_; | 79 base::WeakPtrFactory<WebContentsScreenshotManager> screenshot_factory_; |
| 80 | 80 |
| 81 base::Time last_screenshot_time_; | 81 base::Time last_screenshot_time_; |
| 82 int min_screenshot_interval_ms_; | 82 int min_screenshot_interval_ms_; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(WebContentsScreenshotManager); | 84 DISALLOW_COPY_AND_ASSIGN(WebContentsScreenshotManager); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace content | 87 } // namespace content |
| 88 | 88 |
| 89 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_SCREENSHOT_MANAGER_H_ | 89 #endif // CONTENT_BROWSER_FRAME_HOST_WEB_CONTENTS_SCREENSHOT_MANAGER_H_ |
| OLD | NEW |