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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1316 obj = content_view_core_->GetJavaObject(); | 1316 obj = content_view_core_->GetJavaObject(); |
1317 GetBrowserAccessibilityManager()->ToBrowserAccessibilityManagerAndroid()-> | 1317 GetBrowserAccessibilityManager()->ToBrowserAccessibilityManagerAndroid()-> |
1318 SetContentViewCore(obj); | 1318 SetContentViewCore(obj); |
1319 } | 1319 } |
1320 | 1320 |
1321 if (are_layers_attached_) { | 1321 if (are_layers_attached_) { |
1322 AttachLayers(); | 1322 AttachLayers(); |
1323 if (content_view_core_ && !using_synchronous_compositor_) | 1323 if (content_view_core_ && !using_synchronous_compositor_) |
1324 content_view_core_->GetWindowAndroid()->AddObserver(this); | 1324 content_view_core_->GetWindowAndroid()->AddObserver(this); |
1325 } | 1325 } |
1326 | |
1327 // Ensure ContentsViewCore is aware of the current touch handling state, eg. | |
1328 // in case we've already been running JS for the page as part of preload. | |
1329 if (content_view_core_ && host_) | |
1330 content_view_core_->HasTouchEventHandlers(host_->has_touch_handler()); | |
jdduke (slow)
2014/01/16 22:53:05
This seems fine. If we're worried about initiali
| |
1326 } | 1331 } |
1327 | 1332 |
1328 void RenderWidgetHostViewAndroid::RunAckCallbacks() { | 1333 void RenderWidgetHostViewAndroid::RunAckCallbacks() { |
1329 while (!ack_callbacks_.empty()) { | 1334 while (!ack_callbacks_.empty()) { |
1330 ack_callbacks_.front().Run(); | 1335 ack_callbacks_.front().Run(); |
1331 ack_callbacks_.pop(); | 1336 ack_callbacks_.pop(); |
1332 } | 1337 } |
1333 } | 1338 } |
1334 | 1339 |
1335 void RenderWidgetHostViewAndroid::HasTouchEventHandlers( | 1340 void RenderWidgetHostViewAndroid::HasTouchEventHandlers( |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1452 // RenderWidgetHostView, public: | 1457 // RenderWidgetHostView, public: |
1453 | 1458 |
1454 // static | 1459 // static |
1455 RenderWidgetHostView* | 1460 RenderWidgetHostView* |
1456 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1461 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1457 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1462 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1458 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1463 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1459 } | 1464 } |
1460 | 1465 |
1461 } // namespace content | 1466 } // namespace content |
OLD | NEW |