| 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 #include "blimp/client/core/dummy_blimp_client_context.h" | 5 #include "blimp/client/core/dummy_blimp_client_context.h" |
| 6 | 6 |
| 7 #include "base/logging.h" |
| 7 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 8 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 9 | 10 |
| 10 #if defined(OS_ANDROID) | 11 #if defined(OS_ANDROID) |
| 11 #include "blimp/client/core/android/dummy_blimp_client_context_android.h" | 12 #include "blimp/client/core/android/dummy_blimp_client_context_android.h" |
| 12 #endif // OS_ANDROID | 13 #endif // OS_ANDROID |
| 13 | 14 |
| 14 namespace blimp { | 15 namespace blimp { |
| 15 namespace client { | 16 namespace client { |
| 16 | 17 |
| 17 // This function is declared in //blimp/client/public/blimp_client_context.h, | 18 // This function is declared in //blimp/client/public/blimp_client_context.h, |
| 18 // and either this function or the one in | 19 // and either this function or the one in |
| 19 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to | 20 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to |
| 20 // any binary using BlimpClientContext::Create. | 21 // any binary using BlimpClientContext::Create. |
| 21 // static | 22 // static |
| 22 BlimpClientContext* BlimpClientContext::Create( | 23 BlimpClientContext* BlimpClientContext::Create( |
| 23 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner) { | 24 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, |
| 25 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner) { |
| 24 #if defined(OS_ANDROID) | 26 #if defined(OS_ANDROID) |
| 25 return new DummyBlimpClientContextAndroid(); | 27 return new DummyBlimpClientContextAndroid(); |
| 26 #else | 28 #else |
| 27 return new DummyBlimpClientContext(); | 29 return new DummyBlimpClientContext(); |
| 28 #endif // defined(OS_ANDROID) | 30 #endif // defined(OS_ANDROID) |
| 29 } | 31 } |
| 30 | 32 |
| 31 DummyBlimpClientContext::DummyBlimpClientContext() : BlimpClientContext() {} | 33 DummyBlimpClientContext::DummyBlimpClientContext() : BlimpClientContext() {} |
| 32 | 34 |
| 33 DummyBlimpClientContext::~DummyBlimpClientContext() {} | 35 DummyBlimpClientContext::~DummyBlimpClientContext() {} |
| 34 | 36 |
| 35 void DummyBlimpClientContext::SetDelegate( | 37 void DummyBlimpClientContext::SetDelegate( |
| 36 BlimpClientContextDelegate* delegate) {} | 38 BlimpClientContextDelegate* delegate) {} |
| 37 | 39 |
| 38 std::unique_ptr<BlimpContents> DummyBlimpClientContext::CreateBlimpContents() { | 40 std::unique_ptr<BlimpContents> DummyBlimpClientContext::CreateBlimpContents() { |
| 39 return nullptr; | 41 return nullptr; |
| 40 } | 42 } |
| 41 | 43 |
| 44 void DummyBlimpClientContext::Connect(const std::string& client_auth_token) { |
| 45 NOTREACHED(); |
| 46 } |
| 47 |
| 42 } // namespace client | 48 } // namespace client |
| 43 } // namespace blimp | 49 } // namespace blimp |
| OLD | NEW |