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

Side by Side Diff: chrome/browser/ui/android/context_menu_helper.cc

Issue 2961903002: WIP debug context menu triggering when moving pins
Patch Set: Created 3 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/android/context_menu_helper.h" 5 #include "chrome/browser/ui/android/context_menu_helper.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 content_view_core->GetJavaObject()); 118 content_view_core->GetJavaObject());
119 119
120 if (jcontent_view_core.is_null()) 120 if (jcontent_view_core.is_null())
121 return; 121 return;
122 122
123 JNIEnv* env = base::android::AttachCurrentThread(); 123 JNIEnv* env = base::android::AttachCurrentThread();
124 context_menu_params_ = params; 124 context_menu_params_ = params;
125 render_frame_id_ = render_frame_host->GetRoutingID(); 125 render_frame_id_ = render_frame_host->GetRoutingID();
126 render_process_id_ = render_frame_host->GetProcess()->GetID(); 126 render_process_id_ = render_frame_host->GetProcess()->GetID();
127 127
128 DVLOG(0) << "ctxs ContextMenuHelper::ShowContextMenu";
128 Java_ContextMenuHelper_showContextMenu( 129 Java_ContextMenuHelper_showContextMenu(
129 env, java_obj_, jcontent_view_core, 130 env, java_obj_, jcontent_view_core,
130 ContextMenuHelper::CreateJavaContextMenuParams(params)); 131 ContextMenuHelper::CreateJavaContextMenuParams(params));
131 } 132 }
132 133
133 void ContextMenuHelper::OnContextMenuClosed( 134 void ContextMenuHelper::OnContextMenuClosed(
134 JNIEnv* env, 135 JNIEnv* env,
135 const base::android::JavaParamRef<jobject>& obj) { 136 const base::android::JavaParamRef<jobject>& obj) {
136 web_contents_->NotifyContextMenuClosed(context_menu_params_.custom_context); 137 web_contents_->NotifyContextMenuClosed(context_menu_params_.custom_context);
137 } 138 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 auto* thumbnail_capturer_proxy = thumbnail_capturer.get(); 240 auto* thumbnail_capturer_proxy = thumbnail_capturer.get();
240 thumbnail_capturer_proxy->RequestThumbnailForContextNode( 241 thumbnail_capturer_proxy->RequestThumbnailForContextNode(
241 0, gfx::Size(max_dimen_px, max_dimen_px), 242 0, gfx::Size(max_dimen_px, max_dimen_px),
242 base::Bind(retrieve_callback, base::Passed(&thumbnail_capturer), 243 base::Bind(retrieve_callback, base::Passed(&thumbnail_capturer),
243 base::android::ScopedJavaGlobalRef<jobject>(env, jcallback))); 244 base::android::ScopedJavaGlobalRef<jobject>(env, jcallback)));
244 } 245 }
245 246
246 bool RegisterContextMenuHelper(JNIEnv* env) { 247 bool RegisterContextMenuHelper(JNIEnv* env) {
247 return RegisterNativesImpl(env); 248 return RegisterNativesImpl(env);
248 } 249 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698