| 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 BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 5 #ifndef BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| 6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
| 10 #include "blimp/client/public/blimp_client_context.h" | 10 #include "blimp/client/public/blimp_client_context.h" |
| 11 #include "blimp/client/public/contents/blimp_contents.h" | 11 #include "blimp/client/public/contents/blimp_contents.h" |
| 12 | 12 |
| 13 #if defined(OS_ANDROID) | 13 #if defined(OS_ANDROID) |
| 14 #include "base/android/jni_android.h" | 14 #include "base/android/jni_android.h" |
| 15 #endif // defined(OS_ANDROID) | 15 #endif // defined(OS_ANDROID) |
| 16 | 16 |
| 17 namespace blimp { | 17 namespace blimp { |
| 18 namespace client { | 18 namespace client { |
| 19 | 19 |
| 20 class BlimpContentsManager; |
| 21 |
| 20 #if defined(OS_ANDROID) | 22 #if defined(OS_ANDROID) |
| 21 class BlimpClientContextImplAndroid; | 23 class BlimpClientContextImplAndroid; |
| 22 #endif // defined(OS_ANDROID) | 24 #endif // defined(OS_ANDROID) |
| 23 | 25 |
| 24 // BlimpClientContextImpl is the implementation of the main context-class for | 26 // BlimpClientContextImpl is the implementation of the main context-class for |
| 25 // the blimp client. | 27 // the blimp client. |
| 26 class BlimpClientContextImpl : public BlimpClientContext, | 28 class BlimpClientContextImpl : public BlimpClientContext, |
| 27 base::SupportsUserData { | 29 base::SupportsUserData { |
| 28 public: | 30 public: |
| 29 BlimpClientContextImpl(); | 31 BlimpClientContextImpl(); |
| 30 ~BlimpClientContextImpl() override; | 32 ~BlimpClientContextImpl() override; |
| 31 | 33 |
| 32 #if defined(OS_ANDROID) | 34 #if defined(OS_ANDROID) |
| 33 BlimpClientContextImplAndroid* GetBlimpClientContextImplAndroid(); | 35 BlimpClientContextImplAndroid* GetBlimpClientContextImplAndroid(); |
| 34 #endif // defined(OS_ANDROID) | 36 #endif // defined(OS_ANDROID) |
| 35 | 37 |
| 36 // BlimpClientContext implementation. | 38 // BlimpClientContext implementation. |
| 37 #if defined(OS_ANDROID) | 39 #if defined(OS_ANDROID) |
| 38 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override; | 40 base::android::ScopedJavaLocalRef<jobject> GetJavaObject() override; |
| 39 #endif // defined(OS_ANDROID) | 41 #endif // defined(OS_ANDROID) |
| 40 void SetDelegate(BlimpClientContextDelegate* delegate) override; | 42 void SetDelegate(BlimpClientContextDelegate* delegate) override; |
| 41 std::unique_ptr<BlimpContents> CreateBlimpContents() override; | 43 std::unique_ptr<BlimpContents> CreateBlimpContents() override; |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 BlimpClientContextDelegate* delegate_; | 46 BlimpClientContextDelegate* delegate_; |
| 45 | 47 |
| 48 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_; |
| 49 |
| 46 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); | 50 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); |
| 47 }; | 51 }; |
| 48 | 52 |
| 49 } // namespace client | 53 } // namespace client |
| 50 } // namespace blimp | 54 } // namespace blimp |
| 51 | 55 |
| 52 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 56 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| OLD | NEW |