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

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

Issue 15499005: Add a new SyncedTabDelegate for Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix pre-rendering + revert changes to SessionTabHelper. Created 7 years, 6 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) 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/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/browser/sessions/session_id.h"
13 #include "chrome/browser/ui/toolbar/toolbar_model.h" 14 #include "chrome/browser/ui/toolbar/toolbar_model.h"
14 15
15 class GURL; 16 class GURL;
16 class SkBitmap; 17 class SkBitmap;
17 18
18 namespace browser_sync { 19 namespace browser_sync {
19 class SyncedTabDelegate; 20 class SyncedTabDelegate;
20 } 21 }
21 22
22 namespace content { 23 namespace content {
(...skipping 11 matching lines...) Expand all
34 35
35 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj); 36 static TabAndroid* GetNativeTab(JNIEnv* env, jobject obj);
36 37
37 // TODO(tedchoc): Make pure virtual once all derived classes can be updated. 38 // TODO(tedchoc): Make pure virtual once all derived classes can be updated.
38 virtual content::WebContents* GetWebContents(); 39 virtual content::WebContents* GetWebContents();
39 40
40 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() = 0; 41 virtual browser_sync::SyncedTabDelegate* GetSyncedTabDelegate() = 0;
41 42
42 virtual ToolbarModel::SecurityLevel GetSecurityLevel(); 43 virtual ToolbarModel::SecurityLevel GetSecurityLevel();
43 44
44 int id() const { 45 const SessionID& id() const { return tab_id_; }
45 return tab_id_;
46 }
47 46
48 virtual void OnReceivedHttpAuthRequest(jobject auth_handler, 47 virtual void OnReceivedHttpAuthRequest(jobject auth_handler,
49 const string16& host, 48 const string16& host,
50 const string16& realm) = 0; 49 const string16& realm) = 0;
51 50
52 // Called to show the regular context menu that is triggered by a long press. 51 // Called to show the regular context menu that is triggered by a long press.
53 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0; 52 virtual void ShowContextMenu(const content::ContextMenuParams& params) = 0;
54 53
55 // Called to show a custom context menu. Used by the NTP. 54 // Called to show a custom context menu. Used by the NTP.
56 virtual void ShowCustomContextMenu( 55 virtual void ShowCustomContextMenu(
(...skipping 14 matching lines...) Expand all
71 // TODO(jknotten): Remove this method. Making it non-abstract, so that 70 // TODO(jknotten): Remove this method. Making it non-abstract, so that
72 // derived classes may remove their implementation first. 71 // derived classes may remove their implementation first.
73 virtual void RunExternalProtocolDialog(const GURL& url); 72 virtual void RunExternalProtocolDialog(const GURL& url);
74 73
75 static bool RegisterTabAndroid(JNIEnv* env); 74 static bool RegisterTabAndroid(JNIEnv* env);
76 protected: 75 protected:
77 virtual ~TabAndroid(); 76 virtual ~TabAndroid();
78 77
79 static void InitTabHelpers(content::WebContents* web_contents); 78 static void InitTabHelpers(content::WebContents* web_contents);
80 79
81 static content::WebContents* InitWebContentsFromView(JNIEnv* env, 80 content::WebContents* InitWebContentsFromView(JNIEnv* env,
82 jobject content_view); 81 jobject content_view);
83 82
84 int tab_id_; 83 SessionID tab_id_;
85 84
86 private: 85 private:
87 JavaObjectWeakGlobalRef weak_java_tab_; 86 JavaObjectWeakGlobalRef weak_java_tab_;
88 }; 87 };
89 88
90 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_ 89 #endif // CHROME_BROWSER_ANDROID_TAB_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/tab_android.cc » ('j') | chrome/browser/sync/glue/session_model_associator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698