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 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_ANDROID_LOGO_BRIDGE_H_ 6#define CHROME_BROWSER_ANDROID_LOGO_BRIDGE_H_ 7 8#include <jni.h> 9 10#include "base/macros.h" 11#include "base/memory/weak_ptr.h" 12 13class LogoService; 14 15// The C++ counterpart to LogoBridge.java. Enables Java code to access the 16// default search provider's logo. 17class LogoBridge { 18 public: 19 explicit LogoBridge(jobject j_profile); 20 void Destroy(JNIEnv* env, jobject obj); 21 void GetCurrentLogo(JNIEnv* env, jobject obj, jobject j_logo_observer); 22 23 private: 24 ~LogoBridge(); 25 26 LogoService* logo_service_; 27 base::WeakPtrFactory<LogoBridge> weak_ptr_factory_; 28 29 DISALLOW_COPY_AND_ASSIGN(LogoBridge); 30}; 31 32bool RegisterLogoBridge(JNIEnv* env); 33 34#endif // CHROME_BROWSER_ANDROID_LOGO_BRIDGE_H_ 35