| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |