Chromium Code Reviews| 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_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ | 6 #define CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "blimp/client/public/blimp_client_context_delegate.h" | 9 #include "blimp/client/public/blimp_client_context_delegate.h" |
| 10 | 10 |
| 11 #if defined(OS_ANDROID) | |
| 12 #include "base/android/jni_android.h" | |
| 13 #endif // defined(OS_ANDROID) | |
| 14 | |
| 11 class Profile; | 15 class Profile; |
| 12 | 16 |
| 13 namespace blimp { | 17 namespace blimp { |
| 14 namespace client { | 18 namespace client { |
| 15 class BlimpClientContext; | 19 class BlimpClientContext; |
| 16 class BlimpContents; | 20 class BlimpContents; |
| 17 } // namespace client | 21 } // namespace client |
| 18 } // namespace blimp | 22 } // namespace blimp |
| 19 | 23 |
| 20 // The BlimpClientContextDelegate for //chrome which provides the necessary | 24 // The BlimpClientContextDelegate for //chrome which provides the necessary |
| 21 // functionality required to run Blimp. | 25 // functionality required to run Blimp. |
| 22 class ChromeBlimpClientContextDelegate | 26 class ChromeBlimpClientContextDelegate |
| 23 : public blimp::client::BlimpClientContextDelegate { | 27 : public blimp::client::BlimpClientContextDelegate { |
| 24 public: | 28 public: |
| 25 // Constructs the object and attaches it to the BlimpClientContext that is | 29 // Constructs the object and attaches it to the BlimpClientContext that is |
| 26 // used for the given profile. | 30 // used for the given profile. |
| 27 explicit ChromeBlimpClientContextDelegate(Profile* profile); | 31 explicit ChromeBlimpClientContextDelegate(Profile* profile); |
| 28 // Unattaches itself from the BlimpClientContext before going away. | 32 // Unattaches itself from the BlimpClientContext before going away. |
| 29 ~ChromeBlimpClientContextDelegate() override; | 33 ~ChromeBlimpClientContextDelegate() override; |
| 30 | 34 |
| 35 #if defined(OS_ANDROID) | |
| 36 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override; | |
|
nyquist
2016/07/28 19:15:34
Can this be removed from this class, since it's ne
xingliu
2016/07/28 22:43:09
Done, but didn't change it to abstract class.
| |
| 37 #endif | |
| 38 | |
| 31 // BlimpClientContextDelegate implementation. | 39 // BlimpClientContextDelegate implementation. |
| 32 void AttachBlimpContentsHelpers( | 40 void AttachBlimpContentsHelpers( |
| 33 blimp::client::BlimpContents* blimp_contents) override; | 41 blimp::client::BlimpContents* blimp_contents) override; |
| 34 | 42 |
| 35 private: | 43 private: |
| 36 // The profile this delegate is used for. | 44 // The profile this delegate is used for. |
| 37 Profile* profile_; | 45 Profile* profile_; |
| 38 | 46 |
| 39 // The BlimpClientContext this is the delegate for. | 47 // The BlimpClientContext this is the delegate for. |
| 40 blimp::client::BlimpClientContext* blimp_client_context_; | 48 blimp::client::BlimpClientContext* blimp_client_context_; |
| 41 | 49 |
| 42 DISALLOW_COPY_AND_ASSIGN(ChromeBlimpClientContextDelegate); | 50 DISALLOW_COPY_AND_ASSIGN(ChromeBlimpClientContextDelegate); |
| 43 }; | 51 }; |
| 44 | 52 |
| 45 #endif // CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ | 53 #endif // CHROME_BROWSER_ANDROID_BLIMP_CHROME_BLIMP_CLIENT_CONTEXT_DELEGATE_H_ |
| OLD | NEW |