| 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 #include "content/browser/web_contents/web_contents_screenshot_manager.h" | 5 #include "content/browser/frame_host/web_contents_screenshot_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/threading/worker_pool.h" | 8 #include "base/threading/worker_pool.h" |
| 9 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 10 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 9 #include "content/browser/renderer_host/render_view_host_impl.h" | 11 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 10 #include "content/browser/web_contents/navigation_controller_impl.h" | |
| 11 #include "content/browser/web_contents/navigation_entry_impl.h" | |
| 12 #include "content/browser/web_contents/web_contents_impl.h" | |
| 13 #include "content/public/browser/render_widget_host.h" | 12 #include "content/public/browser/render_widget_host.h" |
| 14 #include "content/public/browser/render_widget_host_view.h" | 13 #include "content/public/browser/render_widget_host_view.h" |
| 15 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
| 16 #include "ui/gfx/codec/png_codec.h" | 15 #include "ui/gfx/codec/png_codec.h" |
| 17 | 16 |
| 18 namespace { | 17 namespace { |
| 19 | 18 |
| 20 // Minimum delay between taking screenshots. | 19 // Minimum delay between taking screenshots. |
| 21 const int kMinScreenshotIntervalMS = 1000; | 20 const int kMinScreenshotIntervalMS = 1000; |
| 22 | 21 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 owner_->GetEntryAtIndex(forward)); | 264 owner_->GetEntryAtIndex(forward)); |
| 266 if (ClearScreenshot(entry)) | 265 if (ClearScreenshot(entry)) |
| 267 --screenshot_count; | 266 --screenshot_count; |
| 268 ++forward; | 267 ++forward; |
| 269 } | 268 } |
| 270 CHECK_GE(screenshot_count, 0); | 269 CHECK_GE(screenshot_count, 0); |
| 271 CHECK_LE(screenshot_count, kMaxScreenshots); | 270 CHECK_LE(screenshot_count, kMaxScreenshots); |
| 272 } | 271 } |
| 273 | 272 |
| 274 } // namespace content | 273 } // namespace content |
| OLD | NEW |