| 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 #include "content/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 message_loop_runner_ = new content::MessageLoopRunner; | 129 message_loop_runner_ = new content::MessageLoopRunner; |
| 130 message_loop_runner_->Run(); | 130 message_loop_runner_->Run(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 bool ScreenshotSetForEntry(NavigationEntryImpl* entry) const { | 133 bool ScreenshotSetForEntry(NavigationEntryImpl* entry) const { |
| 134 return screenshot_set_.count(entry) > 0; | 134 return screenshot_set_.count(entry) > 0; |
| 135 } | 135 } |
| 136 | 136 |
| 137 private: | 137 private: |
| 138 // Overridden from NavigationEntryScreenshotManager: | 138 // Overridden from NavigationEntryScreenshotManager: |
| 139 void TakeScreenshotImpl(RenderViewHost* host, | 139 void WillTakeScreenshot(RenderViewHost* host) override { |
| 140 NavigationEntryImpl* entry) override { | |
| 141 ++waiting_for_screenshots_; | 140 ++waiting_for_screenshots_; |
| 142 screenshot_taken_for_ = host; | 141 screenshot_taken_for_ = host; |
| 143 NavigationEntryScreenshotManager::TakeScreenshotImpl(host, entry); | |
| 144 } | 142 } |
| 145 | 143 |
| 146 void OnScreenshotSet(NavigationEntryImpl* entry) override { | 144 void OnScreenshotSet(NavigationEntryImpl* entry) override { |
| 147 --waiting_for_screenshots_; | 145 --waiting_for_screenshots_; |
| 148 screenshot_set_[entry] = true; | 146 screenshot_set_[entry] = true; |
| 149 NavigationEntryScreenshotManager::OnScreenshotSet(entry); | 147 NavigationEntryScreenshotManager::OnScreenshotSet(entry); |
| 150 if (waiting_for_screenshots_ == 0 && message_loop_runner_.get()) | 148 if (waiting_for_screenshots_ == 0 && message_loop_runner_.get()) |
| 151 message_loop_runner_->Quit(); | 149 message_loop_runner_->Quit(); |
| 152 } | 150 } |
| 153 | 151 |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 details = dispatcher->OnEventFromSource(&release); | 1096 details = dispatcher->OnEventFromSource(&release); |
| 1099 ASSERT_FALSE(details.dispatcher_destroyed); | 1097 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1100 WaitAFrame(); | 1098 WaitAFrame(); |
| 1101 | 1099 |
| 1102 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1100 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1103 EXPECT_FALSE(tracker.overscroll_completed()); | 1101 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1104 } | 1102 } |
| 1105 } | 1103 } |
| 1106 | 1104 |
| 1107 } // namespace content | 1105 } // namespace content |
| OLD | NEW |