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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.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 | « content/browser/web_contents/aura/overscroll_navigation_overlay.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 entry = NavigationEntryImpl::FromNavigationEntry( 127 entry = NavigationEntryImpl::FromNavigationEntry(
128 controller.GetEntryAtOffset(1)); 128 controller.GetEntryAtOffset(1));
129 } else if (ShouldNavigateBack(controller, overscroll_mode)) { 129 } else if (ShouldNavigateBack(controller, overscroll_mode)) {
130 entry = NavigationEntryImpl::FromNavigationEntry( 130 entry = NavigationEntryImpl::FromNavigationEntry(
131 controller.GetEntryAtOffset(-1)); 131 controller.GetEntryAtOffset(-1));
132 } 132 }
133 133
134 gfx::Image image; 134 gfx::Image image;
135 if (entry && entry->screenshot().get()) { 135 if (entry && entry->screenshot().get()) {
136 std::vector<gfx::ImagePNGRep> image_reps; 136 std::vector<gfx::ImagePNGRep> image_reps;
137 image_reps.push_back(gfx::ImagePNGRep(entry->screenshot(), 137 image_reps.push_back(gfx::ImagePNGRep(entry->screenshot(), 1.0f));
138 ui::GetScaleFactorForNativeView(web_contents_window())));
139 image = gfx::Image(image_reps); 138 image = gfx::Image(image_reps);
140 } 139 }
141 SetImage(image); 140 SetImage(image);
142 } 141 }
143 142
144 void stop_forwarding_events() { forward_events_ = false; } 143 void stop_forwarding_events() { forward_events_ = false; }
145 144
146 private: 145 private:
147 virtual ~OverscrollWindowDelegate() {} 146 virtual ~OverscrollWindowDelegate() {}
148 147
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 if (visible) { 1617 if (visible) {
1619 if (!web_contents_->should_normally_be_visible()) 1618 if (!web_contents_->should_normally_be_visible())
1620 web_contents_->WasShown(); 1619 web_contents_->WasShown();
1621 } else { 1620 } else {
1622 if (web_contents_->should_normally_be_visible()) 1621 if (web_contents_->should_normally_be_visible())
1623 web_contents_->WasHidden(); 1622 web_contents_->WasHidden();
1624 } 1623 }
1625 } 1624 }
1626 1625
1627 } // namespace content 1626 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/aura/overscroll_navigation_overlay.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698