| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_NTP_SNIPPETS_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_NTP_SNIPPETS_BRIDGE_H_ | 6 #define CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_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/scoped_observer.h" | 11 #include "base/scoped_observer.h" |
| 12 #include "components/ntp_snippets/ntp_snippets_service.h" | 12 #include "components/ntp_snippets/ntp_snippets_service.h" |
| 13 | 13 |
| 14 // The C++ counterpart to NTPSnippetsBridge.java. Enables Java code to access | 14 // The C++ counterpart to NTPSnippetsBridge.java. Enables Java code to access |
| 15 // the list of snippets to show on the NTP | 15 // the list of snippets to show on the NTP |
| 16 class NTPSnippetsBridge : public ntp_snippets::NTPSnippetsServiceObserver { | 16 class NTPSnippetsBridge : public ntp_snippets::NTPSnippetsServiceObserver { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 37 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; | 37 ntp_snippets::NTPSnippetsService* ntp_snippets_service_; |
| 38 | 38 |
| 39 base::android::ScopedJavaGlobalRef<jobject> observer_; | 39 base::android::ScopedJavaGlobalRef<jobject> observer_; |
| 40 ScopedObserver<ntp_snippets::NTPSnippetsService, | 40 ScopedObserver<ntp_snippets::NTPSnippetsService, |
| 41 ntp_snippets::NTPSnippetsServiceObserver> | 41 ntp_snippets::NTPSnippetsServiceObserver> |
| 42 snippet_service_observer_; | 42 snippet_service_observer_; |
| 43 | 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); | 44 DISALLOW_COPY_AND_ASSIGN(NTPSnippetsBridge); |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 #endif // CHROME_BROWSER_ANDROID_NTP_SNIPPETS_BRIDGE_H_ | 47 #endif // CHROME_BROWSER_ANDROID_NTP_NTP_SNIPPETS_BRIDGE_H_ |
| OLD | NEW |