Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(770)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 2878403002: Support setting mouse cursor icon in Android N. (Closed)
Patch Set: Support setting mouse cursor icon in Android N Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | device/power_save_blocker/BUILD.gn » ('j') | device/power_save_blocker/BUILD.gn » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 #include "content/public/browser/devtools_agent_host.h" 70 #include "content/public/browser/devtools_agent_host.h"
71 #include "content/public/browser/render_view_host.h" 71 #include "content/public/browser/render_view_host.h"
72 #include "content/public/browser/render_widget_host_iterator.h" 72 #include "content/public/browser/render_widget_host_iterator.h"
73 #include "content/public/common/content_switches.h" 73 #include "content/public/common/content_switches.h"
74 #include "gpu/command_buffer/client/gles2_implementation.h" 74 #include "gpu/command_buffer/client/gles2_implementation.h"
75 #include "gpu/command_buffer/client/gles2_interface.h" 75 #include "gpu/command_buffer/client/gles2_interface.h"
76 #include "gpu/config/gpu_driver_bug_workaround_type.h" 76 #include "gpu/config/gpu_driver_bug_workaround_type.h"
77 #include "ipc/ipc_message_macros.h" 77 #include "ipc/ipc_message_macros.h"
78 #include "ipc/ipc_message_start.h" 78 #include "ipc/ipc_message_start.h"
79 #include "skia/ext/image_operations.h" 79 #include "skia/ext/image_operations.h"
80 #include "third_party/WebKit/public/platform/WebCursorInfo.h"
80 #include "third_party/khronos/GLES2/gl2.h" 81 #include "third_party/khronos/GLES2/gl2.h"
81 #include "third_party/khronos/GLES2/gl2ext.h" 82 #include "third_party/khronos/GLES2/gl2ext.h"
82 #include "third_party/skia/include/core/SkCanvas.h" 83 #include "third_party/skia/include/core/SkCanvas.h"
83 #include "ui/android/window_android.h" 84 #include "ui/android/window_android.h"
84 #include "ui/android/window_android_compositor.h" 85 #include "ui/android/window_android_compositor.h"
85 #include "ui/base/layout.h" 86 #include "ui/base/layout.h"
86 #include "ui/events/android/motion_event_android.h" 87 #include "ui/events/android/motion_event_android.h"
87 #include "ui/events/base_event_utils.h" 88 #include "ui/events/base_event_utils.h"
88 #include "ui/events/blink/blink_event_util.h" 89 #include "ui/events/blink/blink_event_util.h"
89 #include "ui/events/blink/did_overscroll_params.h" 90 #include "ui/events/blink/did_overscroll_params.h"
(...skipping 26 matching lines...) Expand all
116 friend class base::RefCounted<PendingReadbackLock>; 117 friend class base::RefCounted<PendingReadbackLock>;
117 118
118 ~PendingReadbackLock() { 119 ~PendingReadbackLock() {
119 DCHECK_EQ(g_pending_readback_lock, this); 120 DCHECK_EQ(g_pending_readback_lock, this);
120 g_pending_readback_lock = nullptr; 121 g_pending_readback_lock = nullptr;
121 } 122 }
122 }; 123 };
123 124
124 using base::android::ApplicationState; 125 using base::android::ApplicationState;
125 using base::android::ApplicationStatusListener; 126 using base::android::ApplicationStatusListener;
127 using blink::WebCursorInfo;
126 128
127 class GLHelperHolder { 129 class GLHelperHolder {
128 public: 130 public:
129 static GLHelperHolder* Create(); 131 static GLHelperHolder* Create();
130 132
131 viz::GLHelper* gl_helper() { return gl_helper_.get(); } 133 viz::GLHelper* gl_helper() { return gl_helper_.get(); }
132 bool IsLost() { 134 bool IsLost() {
133 if (!gl_helper_) 135 if (!gl_helper_)
134 return true; 136 return true;
135 return provider_->ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR; 137 return provider_->ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR;
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 713
712 float RenderWidgetHostViewAndroid::GetBottomControlsHeight() const { 714 float RenderWidgetHostViewAndroid::GetBottomControlsHeight() const {
713 if (!content_view_core_) 715 if (!content_view_core_)
714 return 0.f; 716 return 0.f;
715 717
716 // The height of the browser controls. 718 // The height of the browser controls.
717 return content_view_core_->GetBottomControlsHeightDip(); 719 return content_view_core_->GetBottomControlsHeightDip();
718 } 720 }
719 721
720 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) { 722 void RenderWidgetHostViewAndroid::UpdateCursor(const WebCursor& cursor) {
721 // There are no cursors on Android. 723 CursorInfo cursor_info;
724 cursor.GetCursorInfo(&cursor_info);
725 view_.OnCursorChanged(cursor_info.type == WebCursorInfo::kTypeCustom,
boliu 2017/05/19 02:27:57 this parameter is redundant, type is already passe
jaebaek 2017/05/22 12:08:35 Done.
726 cursor_info.type, cursor_info.custom_image,
727 cursor_info.hotspot);
722 } 728 }
723 729
724 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) { 730 void RenderWidgetHostViewAndroid::SetIsLoading(bool is_loading) {
725 // Do nothing. The UI notification is handled through ContentViewClient which 731 // Do nothing. The UI notification is handled through ContentViewClient which
726 // is TabContentsDelegate. 732 // is TabContentsDelegate.
727 } 733 }
728 734
729 // ----------------------------------------------------------------------------- 735 // -----------------------------------------------------------------------------
730 // TextInputManager::Observer implementations. 736 // TextInputManager::Observer implementations.
731 void RenderWidgetHostViewAndroid::OnUpdateTextInputStateCalled( 737 void RenderWidgetHostViewAndroid::OnUpdateTextInputStateCalled(
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2230 2236
2231 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor(); 2237 ui::WindowAndroidCompositor* compositor = window_android->GetCompositor();
2232 if (!compositor) 2238 if (!compositor)
2233 return; 2239 return;
2234 2240
2235 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>( 2241 overscroll_controller_ = base::MakeUnique<OverscrollControllerAndroid>(
2236 overscroll_refresh_handler, compositor, view_.GetDipScale()); 2242 overscroll_refresh_handler, compositor, view_.GetDipScale());
2237 } 2243 }
2238 2244
2239 } // namespace content 2245 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | device/power_save_blocker/BUILD.gn » ('j') | device/power_save_blocker/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698