| 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/web_contents/web_contents_view_android.h" | 5 #include "content/browser/web_contents/web_contents_view_android.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 void WebContentsViewAndroid::HidePopupMenu() { | 263 void WebContentsViewAndroid::HidePopupMenu() { |
| 264 if (content_view_core_) | 264 if (content_view_core_) |
| 265 content_view_core_->HideSelectPopupMenu(); | 265 content_view_core_->HideSelectPopupMenu(); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void WebContentsViewAndroid::StartDragging( | 268 void WebContentsViewAndroid::StartDragging( |
| 269 const DropData& drop_data, | 269 const DropData& drop_data, |
| 270 blink::WebDragOperationsMask allowed_ops, | 270 blink::WebDragOperationsMask allowed_ops, |
| 271 const gfx::ImageSkia& image, | 271 const gfx::ImageSkia& image, |
| 272 const gfx::Vector2d& image_offset, | 272 const gfx::Vector2d& image_offset, |
| 273 const DragEventSourceInfo& event_info) { | 273 const DragEventSourceInfo& event_info, |
| 274 RenderWidgetHostImpl* source_rwh) { |
| 274 if (drop_data.text.is_null()) { | 275 if (drop_data.text.is_null()) { |
| 275 // Need to clear drag and drop state in blink. | 276 // Need to clear drag and drop state in blink. |
| 276 OnDragEnded(); | 277 OnDragEnded(); |
| 277 return; | 278 return; |
| 278 } | 279 } |
| 279 | 280 |
| 280 gfx::NativeView native_view = GetNativeView(); | 281 gfx::NativeView native_view = GetNativeView(); |
| 281 if (!native_view) { | 282 if (!native_view) { |
| 282 // Need to clear drag and drop state in blink. | 283 // Need to clear drag and drop state in blink. |
| 283 OnDragEnded(); | 284 OnDragEnded(); |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 // This is called when we the renderer asks us to take focus back (i.e., it has | 365 // This is called when we the renderer asks us to take focus back (i.e., it has |
| 365 // iterated past the last focusable element on the page). | 366 // iterated past the last focusable element on the page). |
| 366 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 367 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
| 367 if (web_contents_->GetDelegate() && | 368 if (web_contents_->GetDelegate() && |
| 368 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 369 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
| 369 return; | 370 return; |
| 370 web_contents_->GetRenderWidgetHostView()->Focus(); | 371 web_contents_->GetRenderWidgetHostView()->Focus(); |
| 371 } | 372 } |
| 372 | 373 |
| 373 } // namespace content | 374 } // namespace content |
| OLD | NEW |