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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)
Patch Set: REBASE Created 3 years, 9 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/public/browser/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698