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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2551573002: [Touch emulator] Update cursor when device scale factor changes. (Closed)
Patch Set: nit Created 4 years 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/renderer_host/input/touch_emulator_unittest.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/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 } 1413 }
1414 1414
1415 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { 1415 void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
1416 if (delegate_) 1416 if (delegate_)
1417 delegate_->ScreenInfoChanged(); 1417 delegate_->ScreenInfoChanged();
1418 1418
1419 // The resize message (which may not happen immediately) will carry with it 1419 // The resize message (which may not happen immediately) will carry with it
1420 // the screen info as well as the new size (if the screen has changed scale 1420 // the screen info as well as the new size (if the screen has changed scale
1421 // factor). 1421 // factor).
1422 WasResized(); 1422 WasResized();
1423
1424 if (touch_emulator_) {
1425 touch_emulator_->SetDeviceScaleFactor(
1426 view_.get() ? content::GetScaleFactorForView(view_.get()) : 1.0f);
1427 }
1423 } 1428 }
1424 1429
1425 void RenderWidgetHostImpl::GetSnapshotFromBrowser( 1430 void RenderWidgetHostImpl::GetSnapshotFromBrowser(
1426 const GetSnapshotFromBrowserCallback& callback) { 1431 const GetSnapshotFromBrowserCallback& callback) {
1427 int id = next_browser_snapshot_id_++; 1432 int id = next_browser_snapshot_id_++;
1428 1433
1429 #if defined(OS_MACOSX) 1434 #if defined(OS_MACOSX)
1430 // MacOS version of underlying GrabViewSnapshot() blocks while 1435 // MacOS version of underlying GrabViewSnapshot() blocks while
1431 // display/GPU are in a power-saving mode, so make sure display 1436 // display/GPU are in a power-saving mode, so make sure display
1432 // does not go to sleep for the duration of reading a snapshot. 1437 // does not go to sleep for the duration of reading a snapshot.
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
2498 // Note: We are using the origin URL provided by the sender here. It may be 2503 // Note: We are using the origin URL provided by the sender here. It may be
2499 // different from the receiver's. 2504 // different from the receiver's.
2500 file_system_file.url = 2505 file_system_file.url =
2501 GURL(storage::GetIsolatedFileSystemRootURIString( 2506 GURL(storage::GetIsolatedFileSystemRootURIString(
2502 file_system_url.origin(), filesystem_id, std::string()) 2507 file_system_url.origin(), filesystem_id, std::string())
2503 .append(register_name)); 2508 .append(register_name));
2504 } 2509 }
2505 } 2510 }
2506 2511
2507 } // namespace content 2512 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/touch_emulator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698