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

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

Issue 2147543006: Set the prerender size right and avoid resets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java ('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_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 DCHECK(!content_view_core || !content_view_core_ || 1689 DCHECK(!content_view_core || !content_view_core_ ||
1690 (content_view_core_ == content_view_core)); 1690 (content_view_core_ == content_view_core));
1691 RemoveLayers(); 1691 RemoveLayers();
1692 StopObservingRootWindow(); 1692 StopObservingRootWindow();
1693 1693
1694 bool resize = false; 1694 bool resize = false;
1695 if (content_view_core != content_view_core_) { 1695 if (content_view_core != content_view_core_) {
1696 overscroll_controller_.reset(); 1696 overscroll_controller_.reset();
1697 selection_controller_.reset(); 1697 selection_controller_.reset();
1698 ReleaseLocksOnSurface(); 1698 ReleaseLocksOnSurface();
1699 resize = true; 1699 bool new_content_view_core = content_view_core
no sievers 2016/07/13 21:59:40 nit: i'd call this !|is_size_initialized| or somet
Yusuf 2016/07/14 17:23:37 Done.
1700 && content_view_core->GetViewportSizeDip().width() == 0
1701 && content_view_core->GetViewportSizeDip().height() == 0;
1702 if (content_view_core_ || !new_content_view_core)
1703 resize = true;
1700 if (content_view_core_) { 1704 if (content_view_core_) {
1701 content_view_core_->RemoveObserver(this); 1705 content_view_core_->RemoveObserver(this);
1702 content_view_core_->GetViewAndroid()->RemoveChild(&view_); 1706 content_view_core_->GetViewAndroid()->RemoveChild(&view_);
1703 } 1707 }
1704 if (content_view_core) { 1708 if (content_view_core) {
1705 content_view_core->AddObserver(this); 1709 content_view_core->AddObserver(this);
1706 content_view_core->GetViewAndroid()->AddChild(&view_); 1710 content_view_core->GetViewAndroid()->AddChild(&view_);
1707 } 1711 }
1708 content_view_core_ = content_view_core; 1712 content_view_core_ = content_view_core;
1709 } 1713 }
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 case ui::MotionEvent::ACTION_UP: 1997 case ui::MotionEvent::ACTION_UP:
1994 case ui::MotionEvent::ACTION_POINTER_UP: 1998 case ui::MotionEvent::ACTION_POINTER_UP:
1995 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1999 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1996 delta.InMicroseconds(), 1, 1000000, 50); 2000 delta.InMicroseconds(), 1, 1000000, 50);
1997 default: 2001 default:
1998 return; 2002 return;
1999 } 2003 }
2000 } 2004 }
2001 2005
2002 } // namespace content 2006 } // namespace content
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698