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

Side by Side Diff: content/browser/web_contents/aura/overscroll_navigation_overlay.cc

Issue 529023002: Fixing GestureNav on HDPI displays - merge into M38. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 years, 3 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/web_contents/web_contents_view_aura.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/aura/overscroll_navigation_overlay.h" 5 #include "content/browser/web_contents/aura/overscroll_navigation_overlay.h"
6 6
7 #include "content/browser/frame_host/navigation_entry_impl.h" 7 #include "content/browser/frame_host/navigation_entry_impl.h"
8 #include "content/browser/renderer_host/render_view_host_impl.h" 8 #include "content/browser/renderer_host/render_view_host_impl.h"
9 #include "content/browser/web_contents/aura/image_window_delegate.h" 9 #include "content/browser/web_contents/aura/image_window_delegate.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 ui::Layer* OverscrollNavigationOverlay::CreateSlideLayer(int offset) { 192 ui::Layer* OverscrollNavigationOverlay::CreateSlideLayer(int offset) {
193 const NavigationControllerImpl& controller = web_contents_->GetController(); 193 const NavigationControllerImpl& controller = web_contents_->GetController();
194 const NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry( 194 const NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
195 controller.GetEntryAtOffset(offset)); 195 controller.GetEntryAtOffset(offset));
196 196
197 gfx::Image image; 197 gfx::Image image;
198 if (entry && entry->screenshot().get()) { 198 if (entry && entry->screenshot().get()) {
199 std::vector<gfx::ImagePNGRep> image_reps; 199 std::vector<gfx::ImagePNGRep> image_reps;
200 image_reps.push_back(gfx::ImagePNGRep(entry->screenshot(), 200 image_reps.push_back(gfx::ImagePNGRep(entry->screenshot(), 1.0f));
201 ui::GetScaleFactorForNativeView(window_.get())));
202 image = gfx::Image(image_reps); 201 image = gfx::Image(image_reps);
203 } 202 }
204 if (!layer_delegate_) 203 if (!layer_delegate_)
205 layer_delegate_.reset(new ImageLayerDelegate()); 204 layer_delegate_.reset(new ImageLayerDelegate());
206 layer_delegate_->SetImage(image); 205 layer_delegate_->SetImage(image);
207 206
208 ui::Layer* layer = new ui::Layer(ui::LAYER_TEXTURED); 207 ui::Layer* layer = new ui::Layer(ui::LAYER_TEXTURED);
209 layer->set_delegate(layer_delegate_.get()); 208 layer->set_delegate(layer_delegate_.get());
210 return layer; 209 return layer;
211 } 210 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // pending entry has been created. 292 // pending entry has been created.
294 int committed_entry_id = 293 int committed_entry_id =
295 web_contents_->GetController().GetLastCommittedEntry()->GetUniqueID(); 294 web_contents_->GetController().GetLastCommittedEntry()->GetUniqueID();
296 if (committed_entry_id == pending_entry_id_ || !pending_entry_id_) { 295 if (committed_entry_id == pending_entry_id_ || !pending_entry_id_) {
297 loading_complete_ = true; 296 loading_complete_ = true;
298 StopObservingIfDone(); 297 StopObservingIfDone();
299 } 298 }
300 } 299 }
301 300
302 } // namespace content 301 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698