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

Side by Side Diff: chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delegate_android.cc

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: Fixing rebase bug Created 3 years, 8 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 (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 "chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delega te_android.h" 5 #include "chrome/browser/ui/android/tab_contents/chrome_web_contents_view_delega te_android.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/android/context_menu_helper.h" 8 #include "chrome/browser/ui/android/context_menu_helper.h"
9 #include "content/public/browser/android/content_view_core.h" 9 #include "content/public/browser/android/content_view_core.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 14 matching lines...) Expand all
25 // and must have an implementation although android doesn't use it. 25 // and must have an implementation although android doesn't use it.
26 NOTREACHED(); 26 NOTREACHED();
27 return NULL; 27 return NULL;
28 } 28 }
29 29
30 void ChromeWebContentsViewDelegateAndroid::ShowContextMenu( 30 void ChromeWebContentsViewDelegateAndroid::ShowContextMenu(
31 content::RenderFrameHost* render_frame_host, 31 content::RenderFrameHost* render_frame_host,
32 const content::ContextMenuParams& params) { 32 const content::ContextMenuParams& params) {
33 content::ContentViewCore* content_view_core = 33 content::ContentViewCore* content_view_core =
34 content::ContentViewCore::FromWebContents(web_contents_); 34 content::ContentViewCore::FromWebContents(web_contents_);
35 if (content_view_core && content_view_core->ShowPastePopup(params)) 35 if (content_view_core && content_view_core->ShowSelectionMenu(params))
36 return; 36 return;
37 37
38 // TODO(dtrainor, kouhei): Give WebView a Populator/delegate so it can use 38 // TODO(dtrainor, kouhei): Give WebView a Populator/delegate so it can use
39 // the same context menu code. 39 // the same context menu code.
40 ContextMenuHelper* helper = 40 ContextMenuHelper* helper =
41 ContextMenuHelper::FromWebContents(web_contents_); 41 ContextMenuHelper::FromWebContents(web_contents_);
42 if (helper) 42 if (helper)
43 helper->ShowContextMenu(render_frame_host, params); 43 helper->ShowContextMenu(render_frame_host, params);
44 } 44 }
45 45
46 namespace chrome { 46 namespace chrome {
47 47
48 content::WebContentsViewDelegate* CreateWebContentsViewDelegate( 48 content::WebContentsViewDelegate* CreateWebContentsViewDelegate(
49 content::WebContents* web_contents) { 49 content::WebContents* web_contents) {
50 return new ChromeWebContentsViewDelegateAndroid(web_contents); 50 return new ChromeWebContentsViewDelegateAndroid(web_contents);
51 } 51 }
52 52
53 } // namespace chrome 53 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698