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

Side by Side Diff: content/shell/shell_web_contents_view_delegate_android.cc

Issue 14018004: [Android] Refactor NativeView to be able to use it for AutofillDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/shell/shell_web_contents_view_delegate.h" 5 #include "content/shell/shell_web_contents_view_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/public/browser/android/content_view_core.h" 8 #include "content/public/browser/android/content_view_core.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 #include "content/public/browser/web_contents_view.h" 10 #include "content/public/browser/web_contents_view.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { 27 ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() {
28 } 28 }
29 29
30 void ShellWebContentsViewDelegate::ShowContextMenu( 30 void ShellWebContentsViewDelegate::ShowContextMenu(
31 const ContextMenuParams& params, 31 const ContextMenuParams& params,
32 ContextMenuSourceType type) { 32 ContextMenuSourceType type) {
33 if (params.is_editable && params.selection_text.empty()) { 33 if (params.is_editable && params.selection_text.empty()) {
34 content::ContentViewCore* content_view_core = 34 content::ContentViewCore* content_view_core =
35 web_contents_->GetView()->GetContentNativeView(); 35 ContentViewCore::FromWebContents(web_contents_);
36 if (content_view_core) { 36 if (content_view_core) {
37 content_view_core->ShowPastePopup(params.selection_start.x(), 37 content_view_core->ShowPastePopup(params.selection_start.x(),
38 params.selection_start.y()); 38 params.selection_start.y());
39 } 39 }
40 } 40 }
41 } 41 }
42 42
43 WebDragDestDelegate* ShellWebContentsViewDelegate::GetDragDestDelegate() { 43 WebDragDestDelegate* ShellWebContentsViewDelegate::GetDragDestDelegate() {
44 return NULL; 44 return NULL;
45 } 45 }
46 46
47 } // namespace content 47 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/android/content_view_core.h ('k') | ui/android/java/src/org/chromium/ui/ViewAndroid.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698