| 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/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 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1693 ReleaseLocksOnSurface(); | 1693 ReleaseLocksOnSurface(); |
| 1694 // TODO(yusufo) : Get rid of the below conditions and have a better handling | 1694 // TODO(yusufo) : Get rid of the below conditions and have a better handling |
| 1695 // for resizing after crbug.com/628302 is handled. | 1695 // for resizing after crbug.com/628302 is handled. |
| 1696 bool is_size_initialized = !content_view_core | 1696 bool is_size_initialized = !content_view_core |
| 1697 || content_view_core->GetViewportSizeDip().width() != 0 | 1697 || content_view_core->GetViewportSizeDip().width() != 0 |
| 1698 || content_view_core->GetViewportSizeDip().height() != 0; | 1698 || content_view_core->GetViewportSizeDip().height() != 0; |
| 1699 if (content_view_core_ || is_size_initialized) | 1699 if (content_view_core_ || is_size_initialized) |
| 1700 resize = true; | 1700 resize = true; |
| 1701 if (content_view_core_) { | 1701 if (content_view_core_) { |
| 1702 content_view_core_->RemoveObserver(this); | 1702 content_view_core_->RemoveObserver(this); |
| 1703 content_view_core_->GetViewAndroid()->RemoveChild(&view_); | 1703 view_.RemoveFromParent(); |
| 1704 } | 1704 } |
| 1705 if (content_view_core) { | 1705 if (content_view_core) { |
| 1706 content_view_core->AddObserver(this); | 1706 content_view_core->AddObserver(this); |
| 1707 content_view_core->GetViewAndroid()->AddChild(&view_); | 1707 content_view_core->GetViewAndroid()->AddChild(&view_); |
| 1708 } | 1708 } |
| 1709 content_view_core_ = content_view_core; | 1709 content_view_core_ = content_view_core; |
| 1710 } | 1710 } |
| 1711 | 1711 |
| 1712 BrowserAccessibilityManager* manager = NULL; | 1712 BrowserAccessibilityManager* manager = NULL; |
| 1713 if (host_) | 1713 if (host_) |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1996 case ui::MotionEvent::ACTION_UP: | 1996 case ui::MotionEvent::ACTION_UP: |
| 1997 case ui::MotionEvent::ACTION_POINTER_UP: | 1997 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1998 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1998 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1999 delta.InMicroseconds(), 1, 1000000, 50); | 1999 delta.InMicroseconds(), 1, 1000000, 50); |
| 2000 default: | 2000 default: |
| 2001 return; | 2001 return; |
| 2002 } | 2002 } |
| 2003 } | 2003 } |
| 2004 | 2004 |
| 2005 } // namespace content | 2005 } // namespace content |
| OLD | NEW |