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

Side by Side Diff: chrome/browser/android/tab_android.h

Issue 10861042: Add Android's context menu handler used on the NTP. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resolve Evan's comments. Created 8 years, 4 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 | chrome/browser/ui/webui/ntp/android/context_menu_handler.h » ('j') | no next file with comments »
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 #ifndef CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 5 #ifndef CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 6 #define CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/jni_helper.h" 10 #include "base/android/jni_helper.h"
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/callback_forward.h"
12 #include "base/string16.h" 13 #include "base/string16.h"
13 14
14 class GURL; 15 class GURL;
15 class OnContextMenuItemSelectedCallBack;
16 class SkBitmap; 16 class SkBitmap;
17 17
18 namespace browser_sync { 18 namespace browser_sync {
19 class SyncedTabDelegate; 19 class SyncedTabDelegate;
20 } 20 }
21 21
22 namespace content { 22 namespace content {
23 struct ContextMenuParams; 23 struct ContextMenuParams;
24 class WebContents; 24 class WebContents;
25 } 25 }
(...skipping 17 matching lines...) Expand all
43 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, 43 virtual void OnReceivedHttpAuthRequest(jobject auth_handler,
44 const string16& host, 44 const string16& host,
45 const string16& realm) = 0; 45 const string16& realm) = 0;
46 46
47 // Called to show the regular context menu that is triggered by a long press. 47 // Called to show the regular context menu that is triggered by a long press.
48 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; 48 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
49 49
50 // Called to show a custom context menu. Used by the NTP. 50 // Called to show a custom context menu. Used by the NTP.
51 virtual void ShowCustomContextMenu( 51 virtual void ShowCustomContextMenu(
52 const content::ContextMenuParams& params, 52 const content::ContextMenuParams& params,
53 OnContextMenuItemSelectedCallBack* callback) = 0; 53 const base::Callback<void(int)>& callback) = 0;
54 54
55 virtual void ShowSelectFileDialog( 55 virtual void ShowSelectFileDialog(
56 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0; 56 const base::android::ScopedJavaLocalRef<jobject>& select_file) = 0;
57 57
58 // -------------------------------------------------------------------------- 58 // --------------------------------------------------------------------------
59 // Public methods that call to Java via JNI 59 // Public methods that call to Java via JNI
60 // -------------------------------------------------------------------------- 60 // --------------------------------------------------------------------------
61 // Called when context menu option to create the bookmark shortcut on 61 // Called when context menu option to create the bookmark shortcut on
62 // homescreen is called. 62 // homescreen is called.
63 virtual void AddShortcutToBookmark( 63 virtual void AddShortcutToBookmark(
64 const GURL& url, const string16& title, const SkBitmap& skbitmap, 64 const GURL& url, const string16& title, const SkBitmap& skbitmap,
65 int r_value, int g_value, int b_value) = 0; 65 int r_value, int g_value, int b_value) = 0;
66 66
67 protected: 67 protected:
68 virtual ~TabAndroid(); 68 virtual ~TabAndroid();
69 69
70 int tab_id_; 70 int tab_id_;
71 }; 71 };
72 72
73 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 73 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/android/context_menu_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698