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

Side by Side Diff: chrome/browser/ui/android/tab_model/tab_model_jni_bridge.h

Issue 2479683006: [Sync] Add support for identifying tabbed activites (Closed)
Patch Set: Self review Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_ANDROID_TAB_MODEL_TAB_MODEL_JNI_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_JNI_BRIDGE_H_
6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_JNI_BRIDGE_H_ 6 #define CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_JNI_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/android/jni_weak_ref.h" 11 #include "base/android/jni_weak_ref.h"
12 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "chrome/browser/ui/android/tab_model/tab_model.h" 16 #include "chrome/browser/ui/android/tab_model/tab_model.h"
17 17
18 class Profile; 18 class Profile;
19 class TabAndroid; 19 class TabAndroid;
20 20
21 namespace content { 21 namespace content {
22 class WebContents; 22 class WebContents;
23 } 23 }
24 24
25 // Bridges calls between the C++ and the Java TabModels. Functions in this 25 // Bridges calls between the C++ and the Java TabModels. Functions in this
26 // class should do little more than make calls out to the Java TabModel, which 26 // class should do little more than make calls out to the Java TabModel, which
27 // is what actually stores Tabs. 27 // is what actually stores Tabs.
28 class TabModelJniBridge : public TabModel { 28 class TabModelJniBridge : public TabModel {
29 public: 29 public:
30 TabModelJniBridge(JNIEnv* env, jobject obj, bool is_incognito); 30 TabModelJniBridge(JNIEnv* env,
31 jobject obj,
32 bool is_incognito,
33 bool is_tabbed_activity);
31 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 34 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
32 ~TabModelJniBridge() override; 35 ~TabModelJniBridge() override;
33 36
34 // Registers the JNI bindings. 37 // Registers the JNI bindings.
35 static bool Register(JNIEnv* env); 38 static bool Register(JNIEnv* env);
36 39
37 // Called by JNI 40 // Called by JNI
38 base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid( 41 base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(
39 JNIEnv* env, 42 JNIEnv* env,
40 const base::android::JavaParamRef<jobject>& obj); 43 const base::android::JavaParamRef<jobject>& obj);
(...skipping 26 matching lines...) Expand all
67 const base::android::JavaParamRef<jobject>& obj); 70 const base::android::JavaParamRef<jobject>& obj);
68 71
69 protected: 72 protected:
70 JavaObjectWeakGlobalRef java_object_; 73 JavaObjectWeakGlobalRef java_object_;
71 74
72 private: 75 private:
73 DISALLOW_COPY_AND_ASSIGN(TabModelJniBridge); 76 DISALLOW_COPY_AND_ASSIGN(TabModelJniBridge);
74 }; 77 };
75 78
76 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_JNI_BRIDGE_H_ 79 #endif // CHROME_BROWSER_UI_ANDROID_TAB_MODEL_TAB_MODEL_JNI_BRIDGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/android/tab_model/tab_model.cc ('k') | chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698