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

Unified Diff: chrome/browser/android/chrome_service_tab_launcher.h

Issue 2119273002: Merge ChromeServiceTabLauncher and ServiceTabLauncher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into chrome_service_tab_launcher 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/chrome_service_tab_launcher.h
diff --git a/components/service_tab_launcher/browser/android/service_tab_launcher.h b/chrome/browser/android/chrome_service_tab_launcher.h
similarity index 73%
rename from components/service_tab_launcher/browser/android/service_tab_launcher.h
rename to chrome/browser/android/chrome_service_tab_launcher.h
index 004e78bf6d323894765b8517c22ab2f0596afe19..782625abb7b0f8b03b147f024e3456eaa0cd3db0 100644
--- a/components/service_tab_launcher/browser/android/service_tab_launcher.h
+++ b/chrome/browser/android/chrome_service_tab_launcher.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_SERVICE_TAB_LAUNCHER_BROWSER_ANDROID_SERVICE_TAB_LAUNCHER_H_
-#define COMPONENTS_SERVICE_TAB_LAUNCHER_BROWSER_ANDROID_SERVICE_TAB_LAUNCHER_H_
+#ifndef CHROME_BROWSER_ANDROID_CHROME_SERVICE_TAB_LAUNCHER_H_
+#define CHROME_BROWSER_ANDROID_CHROME_SERVICE_TAB_LAUNCHER_H_
#include "base/android/jni_android.h"
#include "base/callback_forward.h"
@@ -17,18 +17,16 @@ struct OpenURLParams;
class WebContents;
}
-namespace service_tab_launcher {
-
// Launcher for creating new tabs on Android from a background service, where
// there may not necessarily be an Activity or a tab model at all. When the
// tab has been launched, the user of this class will be informed with the
// content::WebContents instance associated with the tab.
-class ServiceTabLauncher {
+class ChromeServiceTabLauncher {
Peter Beverloo 2016/07/05 11:23:04 What about just calling this ServiceTabLauncher? (
pkotwicz 2016/07/05 17:09:59 I renamed this class to ServiceTabLauncher (and th
using TabLaunchedCallback = base::Callback<void(content::WebContents*)>;
public:
// Returns the singleton instance of the service tab launcher.
- static ServiceTabLauncher* GetInstance();
+ static ChromeServiceTabLauncher* GetInstance();
// Launches a new tab when we're in a Service rather than in an Activity.
// |callback| will be invoked with the resulting content::WebContents* when
@@ -42,21 +40,19 @@ class ServiceTabLauncher {
// the provisional load for the main frame of the navigation.
void OnTabLaunched(int request_id, content::WebContents* web_contents);
- static bool RegisterServiceTabLauncher(JNIEnv* env);
+ static bool Register(JNIEnv* env);
private:
- friend struct base::DefaultSingletonTraits<ServiceTabLauncher>;
+ friend struct base::DefaultSingletonTraits<ChromeServiceTabLauncher>;
- ServiceTabLauncher();
- ~ServiceTabLauncher();
+ ChromeServiceTabLauncher();
+ ~ChromeServiceTabLauncher();
IDMap<TabLaunchedCallback, IDMapOwnPointer> tab_launched_callbacks_;
base::android::ScopedJavaGlobalRef<jobject> java_object_;
- DISALLOW_COPY_AND_ASSIGN(ServiceTabLauncher);
+ DISALLOW_COPY_AND_ASSIGN(ChromeServiceTabLauncher);
};
-} // namespace service_tab_launcher
-
-#endif // COMPONENTS_SERVICE_TAB_LAUNCHER_BROWSER_ANDROID_SERVICE_TAB_LAUNCHER_H_
+#endif // CHROME_BROWSER_ANDROID_CHROME_SERVICE_TAB_LAUNCHER_H_

Powered by Google App Engine
This is Rietveld 408576698