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

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

Issue 2088443003: Shortcut ctrl+shift+T added on android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit fixes based on review. Created 4 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_ANDROID_RECENTLY_CLOSED_TABS_BRIDGE_H_ 5 #ifndef CHROME_BROWSER_ANDROID_RECENTLY_CLOSED_TABS_BRIDGE_H_
6 #define CHROME_BROWSER_ANDROID_RECENTLY_CLOSED_TABS_BRIDGE_H_ 6 #define CHROME_BROWSER_ANDROID_RECENTLY_CLOSED_TABS_BRIDGE_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/sessions/core/tab_restore_service_observer.h" 13 #include "components/sessions/core/tab_restore_service_observer.h"
14 14
15 class Profile; 15 class Profile;
16 class TabModel;
David Trainor- moved to gerrit 2016/07/14 18:25:53 Do you need this?
16 17
17 // Provides the list of recently closed tabs to Java. 18 // Provides the list of recently closed tabs to Java.
18 class RecentlyClosedTabsBridge : public sessions::TabRestoreServiceObserver { 19 class RecentlyClosedTabsBridge : public sessions::TabRestoreServiceObserver {
19 public: 20 public:
20 explicit RecentlyClosedTabsBridge(Profile* profile); 21 explicit RecentlyClosedTabsBridge(Profile* profile);
21 22
22 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); 23 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
23 void SetRecentlyClosedCallback( 24 void SetRecentlyClosedCallback(
24 JNIEnv* env, 25 JNIEnv* env,
25 const base::android::JavaParamRef<jobject>& obj, 26 const base::android::JavaParamRef<jobject>& obj,
26 const base::android::JavaParamRef<jobject>& jcallback); 27 const base::android::JavaParamRef<jobject>& jcallback);
27 jboolean GetRecentlyClosedTabs( 28 jboolean GetRecentlyClosedTabs(
28 JNIEnv* env, 29 JNIEnv* env,
29 const base::android::JavaParamRef<jobject>& obj, 30 const base::android::JavaParamRef<jobject>& obj,
30 const base::android::JavaParamRef<jobject>& jtabs, 31 const base::android::JavaParamRef<jobject>& jtabs,
31 jint max_tab_count); 32 jint max_tab_count);
32 jboolean OpenRecentlyClosedTab( 33 jboolean OpenRecentlyClosedTab(
33 JNIEnv* env, 34 JNIEnv* env,
34 const base::android::JavaParamRef<jobject>& obj, 35 const base::android::JavaParamRef<jobject>& obj,
35 const base::android::JavaParamRef<jobject>& jtab, 36 const base::android::JavaParamRef<jobject>& jtab,
36 jint tab_id, 37 jint tab_id,
37 jint j_disposition); 38 jint j_disposition);
39 jboolean OpenMostRecentlyClosedTab(
40 JNIEnv* env,
41 const base::android::JavaParamRef<jobject>& obj);
38 void ClearRecentlyClosedTabs(JNIEnv* env, 42 void ClearRecentlyClosedTabs(JNIEnv* env,
39 const base::android::JavaParamRef<jobject>& obj); 43 const base::android::JavaParamRef<jobject>& obj);
40 44
41 // Observer callback for TabRestoreServiceObserver. Notifies the registered 45 // Observer callback for TabRestoreServiceObserver. Notifies the registered
42 // callback that the recently closed tabs list has changed. 46 // callback that the recently closed tabs list has changed.
43 void TabRestoreServiceChanged(sessions::TabRestoreService* service) override; 47 void TabRestoreServiceChanged(sessions::TabRestoreService* service) override;
44 48
45 // Observer callback when our associated TabRestoreService is destroyed. 49 // Observer callback when our associated TabRestoreService is destroyed.
46 void TabRestoreServiceDestroyed( 50 void TabRestoreServiceDestroyed(
47 sessions::TabRestoreService* service) override; 51 sessions::TabRestoreService* service) override;
(...skipping 14 matching lines...) Expand all
62 // The profile whose recently closed tabs are being monitored. 66 // The profile whose recently closed tabs are being monitored.
63 Profile* profile_; 67 Profile* profile_;
64 68
65 // TabRestoreService that we are observing. 69 // TabRestoreService that we are observing.
66 sessions::TabRestoreService* tab_restore_service_; 70 sessions::TabRestoreService* tab_restore_service_;
67 71
68 DISALLOW_COPY_AND_ASSIGN(RecentlyClosedTabsBridge); 72 DISALLOW_COPY_AND_ASSIGN(RecentlyClosedTabsBridge);
69 }; 73 };
70 74
71 #endif // CHROME_BROWSER_ANDROID_RECENTLY_CLOSED_TABS_BRIDGE_H_ 75 #endif // CHROME_BROWSER_ANDROID_RECENTLY_CLOSED_TABS_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698