| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 335 |
| 336 void WebContentsViewAndroid::OnPerformDrop(DropData* drop_data, | 336 void WebContentsViewAndroid::OnPerformDrop(DropData* drop_data, |
| 337 const gfx::Point& location, | 337 const gfx::Point& location, |
| 338 const gfx::Point& screen_location) { | 338 const gfx::Point& screen_location) { |
| 339 web_contents_->GetRenderViewHost()->GetWidget()->FilterDropData(drop_data); | 339 web_contents_->GetRenderViewHost()->GetWidget()->FilterDropData(drop_data); |
| 340 web_contents_->GetRenderViewHost()->GetWidget()->DragTargetDrop( | 340 web_contents_->GetRenderViewHost()->GetWidget()->DragTargetDrop( |
| 341 *drop_data, location, screen_location, 0); | 341 *drop_data, location, screen_location, 0); |
| 342 } | 342 } |
| 343 | 343 |
| 344 void WebContentsViewAndroid::OnDragEnded() { | 344 void WebContentsViewAndroid::OnDragEnded() { |
| 345 web_contents_->GetRenderViewHost()->DragSourceSystemDragEnded(); | 345 web_contents_->GetRenderViewHost()->GetWidget()->DragSourceSystemDragEnded(); |
| 346 } | 346 } |
| 347 | 347 |
| 348 void WebContentsViewAndroid::GotFocus() { | 348 void WebContentsViewAndroid::GotFocus() { |
| 349 // This is only used in the views FocusManager stuff but it bleeds through | 349 // This is only used in the views FocusManager stuff but it bleeds through |
| 350 // all subclasses. http://crbug.com/21875 | 350 // all subclasses. http://crbug.com/21875 |
| 351 } | 351 } |
| 352 | 352 |
| 353 // This is called when we the renderer asks us to take focus back (i.e., it has | 353 // This is called when we the renderer asks us to take focus back (i.e., it has |
| 354 // iterated past the last focusable element on the page). | 354 // iterated past the last focusable element on the page). |
| 355 void WebContentsViewAndroid::TakeFocus(bool reverse) { | 355 void WebContentsViewAndroid::TakeFocus(bool reverse) { |
| 356 if (web_contents_->GetDelegate() && | 356 if (web_contents_->GetDelegate() && |
| 357 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) | 357 web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse)) |
| 358 return; | 358 return; |
| 359 web_contents_->GetRenderWidgetHostView()->Focus(); | 359 web_contents_->GetRenderWidgetHostView()->Focus(); |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace content | 362 } // namespace content |
| OLD | NEW |