| 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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 gesture_provider_(ui::GetGestureProviderConfig( | 339 gesture_provider_(ui::GetGestureProviderConfig( |
| 340 ui::GestureProviderConfigType::CURRENT_PLATFORM), | 340 ui::GestureProviderConfigType::CURRENT_PLATFORM), |
| 341 this), | 341 this), |
| 342 stylus_text_selector_(this), | 342 stylus_text_selector_(this), |
| 343 using_browser_compositor_(CompositorImpl::IsInitialized()), | 343 using_browser_compositor_(CompositorImpl::IsInitialized()), |
| 344 frame_evictor_(new DelegatedFrameEvictor(this)), | 344 frame_evictor_(new DelegatedFrameEvictor(this)), |
| 345 locks_on_frame_count_(0), | 345 locks_on_frame_count_(0), |
| 346 observing_root_window_(false), | 346 observing_root_window_(false), |
| 347 weak_ptr_factory_(this) { | 347 weak_ptr_factory_(this) { |
| 348 if (CompositorImpl::GetSurfaceManager()) | 348 if (CompositorImpl::GetSurfaceManager()) |
| 349 id_allocator_ = CompositorImpl::CreateSurfaceIdAllocator(); | 349 id_allocator_.reset( |
| 350 new cc::SurfaceIdAllocator(CompositorImpl::AllocateSurfaceClientId())); |
| 350 host_->SetView(this); | 351 host_->SetView(this); |
| 351 SetContentViewCore(content_view_core); | 352 SetContentViewCore(content_view_core); |
| 352 } | 353 } |
| 353 | 354 |
| 354 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() { | 355 RenderWidgetHostViewAndroid::~RenderWidgetHostViewAndroid() { |
| 355 if (content_view_core_) | 356 if (content_view_core_) |
| 356 content_view_core_->RemoveObserver(this); | 357 content_view_core_->RemoveObserver(this); |
| 357 SetContentViewCore(NULL); | 358 SetContentViewCore(NULL); |
| 358 DCHECK(ack_callbacks_.empty()); | 359 DCHECK(ack_callbacks_.empty()); |
| 359 DCHECK(!surface_factory_); | 360 DCHECK(!surface_factory_); |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1978 case ui::MotionEvent::ACTION_UP: | 1979 case ui::MotionEvent::ACTION_UP: |
| 1979 case ui::MotionEvent::ACTION_POINTER_UP: | 1980 case ui::MotionEvent::ACTION_POINTER_UP: |
| 1980 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", | 1981 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", |
| 1981 delta.InMicroseconds(), 1, 1000000, 50); | 1982 delta.InMicroseconds(), 1, 1000000, 50); |
| 1982 default: | 1983 default: |
| 1983 return; | 1984 return; |
| 1984 } | 1985 } |
| 1985 } | 1986 } |
| 1986 | 1987 |
| 1987 } // namespace content | 1988 } // namespace content |
| OLD | NEW |