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

Unified Diff: chrome/browser/android/webapps/webapp_registry.cc

Issue 2206953002: Use mojo for WebappRegistry. Base URL: https://chromium.googlesource.com/chromium/src.git@java-interface-registry
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/webapps/webapp_registry.cc
diff --git a/chrome/browser/android/webapps/webapp_registry.cc b/chrome/browser/android/webapps/webapp_registry.cc
deleted file mode 100644
index 318244d3805794ea16c6597386f46d80605206b3..0000000000000000000000000000000000000000
--- a/chrome/browser/android/webapps/webapp_registry.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/android/webapps/webapp_registry.h"
-
-#include <jni.h>
-
-#include "base/android/context_utils.h"
-#include "base/android/jni_android.h"
-#include "base/callback.h"
-#include "chrome/browser/io_thread.h"
-#include "content/public/browser/browser_thread.h"
-#include "jni/WebappRegistry_jni.h"
-
-void WebappRegistry::UnregisterWebapps(const base::Closure& callback) {
- JNIEnv* env = base::android::AttachCurrentThread();
- uintptr_t callback_pointer = reinterpret_cast<uintptr_t>(
- new base::Closure(callback));
-
- Java_WebappRegistry_unregisterAllWebapps(
- env,
- base::android::GetApplicationContext(),
- callback_pointer);
-}
-
-void WebappRegistry::ClearWebappHistory(const base::Closure& callback) {
- JNIEnv* env = base::android::AttachCurrentThread();
- uintptr_t callback_pointer = reinterpret_cast<uintptr_t>(
- new base::Closure(callback));
-
- Java_WebappRegistry_clearWebappHistory(
- env,
- base::android::GetApplicationContext(),
- callback_pointer);
-}
-
-// Callback used by Java when all web apps have been unregistered.
-void OnWebappsUnregistered(JNIEnv* env,
- const JavaParamRef<jclass>& clazz,
- jlong jcallback) {
- base::Closure* callback = reinterpret_cast<base::Closure*>(jcallback);
- callback->Run();
- delete callback;
-}
-
-// Callback used by Java when all web app last used times have been cleared.
-void OnClearedWebappHistory(JNIEnv* env,
- const JavaParamRef<jclass>& clazz,
- jlong jcallback) {
- base::Closure* callback = reinterpret_cast<base::Closure*>(jcallback);
- callback->Run();
- delete callback;
-}
-
-// static
-bool WebappRegistry::RegisterWebappRegistry(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
« no previous file with comments | « chrome/browser/android/webapps/webapp_registry.h ('k') | chrome/browser/android/webapps/webapp_registry.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698