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

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

Issue 2688413007: Add display::GetDisplayNearestView (Closed)
Patch Set: add missing files Created 3 years, 10 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
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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 1415
1416 void RenderWidgetHostImpl::NotifyScreenInfoChanged() { 1416 void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
1417 if (delegate_) 1417 if (delegate_)
1418 delegate_->ScreenInfoChanged(); 1418 delegate_->ScreenInfoChanged();
1419 1419
1420 // The resize message (which may not happen immediately) will carry with it 1420 // The resize message (which may not happen immediately) will carry with it
1421 // the screen info as well as the new size (if the screen has changed scale 1421 // the screen info as well as the new size (if the screen has changed scale
1422 // factor). 1422 // factor).
1423 WasResized(); 1423 WasResized();
1424 1424
1425 if (touch_emulator_) { 1425 if (touch_emulator_) {
tapted 2017/02/15 00:36:10 nit: curlies not needed
Jinsuk Kim 2017/02/16 10:11:25 Done.
1426 touch_emulator_->SetDeviceScaleFactor( 1426 touch_emulator_->SetDeviceScaleFactor(GetScaleFactorForView(view_.get()));
1427 view_.get() ? content::GetScaleFactorForView(view_.get()) : 1.0f);
1428 } 1427 }
1429 } 1428 }
1430 1429
1431 void RenderWidgetHostImpl::GetSnapshotFromBrowser( 1430 void RenderWidgetHostImpl::GetSnapshotFromBrowser(
1432 const GetSnapshotFromBrowserCallback& callback) { 1431 const GetSnapshotFromBrowserCallback& callback) {
1433 int id = next_browser_snapshot_id_++; 1432 int id = next_browser_snapshot_id_++;
1434 1433
1435 #if defined(OS_MACOSX) 1434 #if defined(OS_MACOSX)
1436 // MacOS version of underlying GrabViewSnapshot() blocks while 1435 // MacOS version of underlying GrabViewSnapshot() blocks while
1437 // 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
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 } 1951 }
1953 1952
1954 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) { 1953 void RenderWidgetHostImpl::OnSetCursor(const WebCursor& cursor) {
1955 SetCursor(cursor); 1954 SetCursor(cursor);
1956 } 1955 }
1957 1956
1958 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled( 1957 void RenderWidgetHostImpl::SetTouchEventEmulationEnabled(
1959 bool enabled, ui::GestureProviderConfigType config_type) { 1958 bool enabled, ui::GestureProviderConfigType config_type) {
1960 if (enabled) { 1959 if (enabled) {
1961 if (!touch_emulator_) { 1960 if (!touch_emulator_) {
1962 touch_emulator_.reset(new TouchEmulator( 1961 touch_emulator_.reset(
tapted 2017/02/15 00:36:10 touch_emulator_ = base::MakeUnique<TouchEmulator>(
Jinsuk Kim 2017/02/16 10:11:24 Done.
1963 this, 1962 new TouchEmulator(this, GetScaleFactorForView(view_.get())));
1964 view_.get() ? content::GetScaleFactorForView(view_.get()) : 1.0f));
1965 } 1963 }
1966 touch_emulator_->Enable(config_type); 1964 touch_emulator_->Enable(config_type);
1967 } else { 1965 } else {
1968 if (touch_emulator_) 1966 if (touch_emulator_)
1969 touch_emulator_->Disable(); 1967 touch_emulator_->Disable();
1970 } 1968 }
1971 } 1969 }
1972 1970
1973 void RenderWidgetHostImpl::OnTextInputStateChanged( 1971 void RenderWidgetHostImpl::OnTextInputStateChanged(
1974 const TextInputState& params) { 1972 const TextInputState& params) {
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 // different from the receiver's. 2505 // different from the receiver's.
2508 file_system_file.url = 2506 file_system_file.url =
2509 GURL(storage::GetIsolatedFileSystemRootURIString( 2507 GURL(storage::GetIsolatedFileSystemRootURIString(
2510 file_system_url.origin(), filesystem_id, std::string()) 2508 file_system_url.origin(), filesystem_id, std::string())
2511 .append(register_name)); 2509 .append(register_name));
2512 file_system_file.filesystem_id = filesystem_id; 2510 file_system_file.filesystem_id = filesystem_id;
2513 } 2511 }
2514 } 2512 }
2515 2513
2516 } // namespace content 2514 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698