google_accounts_callback_proxy.h 994 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef WEBLAYER_BROWSER_GOOGLE_ACCOUNTS_CALLBACK_PROXY_H_
  5. #define WEBLAYER_BROWSER_GOOGLE_ACCOUNTS_CALLBACK_PROXY_H_
  6. #include <jni.h>
  7. #include "base/android/scoped_java_ref.h"
  8. #include "base/memory/raw_ptr.h"
  9. #include "weblayer/public/google_accounts_delegate.h"
  10. namespace weblayer {
  11. class Tab;
  12. class GoogleAccountsCallbackProxy : public GoogleAccountsDelegate {
  13. public:
  14. GoogleAccountsCallbackProxy(JNIEnv* env, jobject obj, Tab* tab);
  15. ~GoogleAccountsCallbackProxy() override;
  16. // GoogleAccountsDelegate:
  17. void OnGoogleAccountsRequest(
  18. const signin::ManageAccountsParams& params) override;
  19. std::string GetGaiaId() override;
  20. private:
  21. raw_ptr<Tab> tab_;
  22. base::android::ScopedJavaGlobalRef<jobject> java_impl_;
  23. };
  24. } // namespace weblayer
  25. #endif // WEBLAYER_BROWSER_GOOGLE_ACCOUNTS_CALLBACK_PROXY_H_