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

Side by Side Diff: content/browser/frame_host/navigation_entry_screenshot_manager.cc

Issue 291003002: Move OverscrollController to RenderWidgetHostViewAura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_event_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame_host/navigation_entry_screenshot_manager.h" 5 #include "content/browser/frame_host/navigation_entry_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" 9 #include "content/browser/frame_host/navigation_controller_impl.h"
10 #include "content/browser/frame_host/navigation_entry_impl.h" 10 #include "content/browser/frame_host/navigation_entry_impl.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (!overscroll_enabled) 91 if (!overscroll_enabled)
92 return; 92 return;
93 93
94 NavigationEntryImpl* entry = 94 NavigationEntryImpl* entry =
95 NavigationEntryImpl::FromNavigationEntry(owner_->GetLastCommittedEntry()); 95 NavigationEntryImpl::FromNavigationEntry(owner_->GetLastCommittedEntry());
96 if (!entry) 96 if (!entry)
97 return; 97 return;
98 98
99 RenderViewHost* render_view_host = 99 RenderViewHost* render_view_host =
100 owner_->delegate()->GetRenderViewHost(); 100 owner_->delegate()->GetRenderViewHost();
101 if (!static_cast<RenderViewHostImpl*> 101 // TODO(jdduke): Determine if necessary?
102 /*if (!static_cast<RenderViewHostImpl*>
102 (render_view_host)->overscroll_controller()) { 103 (render_view_host)->overscroll_controller()) {
103 return; 104 return;
104 } 105 }*/
sadrul 2014/05/22 16:18:27 The screenshots are used only when overscroll is t
jdduke (slow) 2014/05/22 16:21:31 Any ideas on another way to plumb through this dat
sadrul 2014/05/22 16:53:20 We compile it on all platforms, yeah. Maybe we co
jdduke (slow) 2014/05/22 19:29:38 Hmm, I started down that road and found some runti
105 content::RenderWidgetHostView* view = render_view_host->GetView(); 106 content::RenderWidgetHostView* view = render_view_host->GetView();
106 if (!view) 107 if (!view)
107 return; 108 return;
108 109
109 // Make sure screenshots aren't taken too frequently. 110 // Make sure screenshots aren't taken too frequently.
110 base::Time now = base::Time::Now(); 111 base::Time now = base::Time::Now();
111 if (now - last_screenshot_time_ < 112 if (now - last_screenshot_time_ <
112 base::TimeDelta::FromMilliseconds(min_screenshot_interval_ms_)) { 113 base::TimeDelta::FromMilliseconds(min_screenshot_interval_ms_)) {
113 return; 114 return;
114 } 115 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 owner_->GetEntryAtIndex(forward)); 288 owner_->GetEntryAtIndex(forward));
288 if (ClearScreenshot(entry)) 289 if (ClearScreenshot(entry))
289 --screenshot_count; 290 --screenshot_count;
290 ++forward; 291 ++forward;
291 } 292 }
292 CHECK_GE(screenshot_count, 0); 293 CHECK_GE(screenshot_count, 0);
293 CHECK_LE(screenshot_count, kMaxScreenshots); 294 CHECK_LE(screenshot_count, kMaxScreenshots);
294 } 295 }
295 296
296 } // namespace content 297 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_event_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698