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

Unified Diff: content/browser/compositor/delegated_frame_host.cc

Issue 284413002: Fix virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review nits Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/compositor/delegated_frame_host.cc
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index 229d190e0667bead5a6194cc38d93a46af38844e..a7207ea5a6be67e67522258ab29b453324820cf2 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -25,7 +25,17 @@ namespace content {
// DelegatedFrameHostClient
bool DelegatedFrameHostClient::ShouldCreateResizeLock() {
+ // On Windows and Linux, holding pointer moves will not help throttling
+ // resizes.
+ // TODO(piman): on Windows we need to block (nested message loop?) the
+ // WM_SIZE event. On Linux we need to throttle at the WM level using
+ // _NET_WM_SYNC_REQUEST.
+ // TODO(ccameron): Mac browser window resizing is incompletely implemented.
+#if !defined(OS_CHROMEOS)
+ return false;
+#else
return GetDelegatedFrameHost()->ShouldCreateResizeLock();
+#endif
}
void DelegatedFrameHostClient::RequestCopyOfOutput(
@@ -82,15 +92,6 @@ void DelegatedFrameHost::MaybeCreateResizeLock() {
}
bool DelegatedFrameHost::ShouldCreateResizeLock() {
- // On Windows and Linux, holding pointer moves will not help throttling
- // resizes.
- // TODO(piman): on Windows we need to block (nested message loop?) the
- // WM_SIZE event. On Linux we need to throttle at the WM level using
- // _NET_WM_SYNC_REQUEST.
- // TODO(ccameron): Mac browser window resizing is incompletely implemented.
-#if !defined(OS_CHROMEOS)
- return false;
-#else
RenderWidgetHostImpl* host = client_->GetHost();
if (resize_lock_)
@@ -100,7 +101,7 @@ bool DelegatedFrameHost::ShouldCreateResizeLock() {
return false;
gfx::Size desired_size = client_->DesiredFrameSize();
- if (desired_size == current_frame_size_in_dip_)
+ if (desired_size == current_frame_size_in_dip_ || desired_size.IsEmpty())
return false;
ui::Compositor* compositor = client_->GetCompositor();
@@ -108,7 +109,6 @@ bool DelegatedFrameHost::ShouldCreateResizeLock() {
return false;
return true;
-#endif
}
void DelegatedFrameHost::RequestCopyOfOutput(

Powered by Google App Engine
This is Rietveld 408576698