| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // the blimp client. | 26 // the blimp client. |
| 27 class BlimpClientContextImpl : public BlimpClientContext, | 27 class BlimpClientContextImpl : public BlimpClientContext, |
| 28 public NetworkEventObserver { | 28 public NetworkEventObserver { |
| 29 public: | 29 public: |
| 30 // The |io_thread_task_runner| must be the task runner to use for IO | 30 // The |io_thread_task_runner| must be the task runner to use for IO |
| 31 // operations. | 31 // operations. |
| 32 explicit BlimpClientContextImpl( | 32 explicit BlimpClientContextImpl( |
| 33 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner); | 33 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner); |
| 34 ~BlimpClientContextImpl() override; | 34 ~BlimpClientContextImpl() override; |
| 35 | 35 |
| 36 // Get BlimpClientContextDelegate which contains embedder callbacks. |
| 37 BlimpClientContextDelegate* GetDelegate(); |
| 38 |
| 36 // BlimpClientContext implementation. | 39 // BlimpClientContext implementation. |
| 37 void SetDelegate(BlimpClientContextDelegate* delegate) override; | 40 void SetDelegate(BlimpClientContextDelegate* delegate) override; |
| 38 std::unique_ptr<BlimpContents> CreateBlimpContents() override; | 41 std::unique_ptr<BlimpContents> CreateBlimpContents() override; |
| 39 | 42 |
| 40 // NetworkEventObserver implementation. | 43 // NetworkEventObserver implementation. |
| 41 void OnConnected() override; | 44 void OnConnected() override; |
| 42 void OnDisconnected(int result) override; | 45 void OnDisconnected(int result) override; |
| 43 | 46 |
| 44 private: | 47 private: |
| 45 // Provides functionality from the embedder. | 48 // Provides functionality from the embedder. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 60 | 63 |
| 61 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; | 64 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; |
| 62 | 65 |
| 63 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); | 66 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 } // namespace client | 69 } // namespace client |
| 67 } // namespace blimp | 70 } // namespace blimp |
| 68 | 71 |
| 69 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 72 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| OLD | NEW |