| 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/context/dummy_blimp_client_context.h" | 5 #include "blimp/client/core/context/dummy_blimp_client_context.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "blimp/client/public/compositor/compositor_dependencies.h" | 11 #include "blimp/client/public/compositor/compositor_dependencies.h" |
| 12 | 12 |
| 13 #if defined(OS_ANDROID) | 13 #if defined(OS_ANDROID) |
| 14 #include "blimp/client/core/context/android/dummy_blimp_client_context_android.h
" | 14 #include "blimp/client/core/context/android/dummy_blimp_client_context_android.h
" |
| 15 #endif // OS_ANDROID | 15 #endif // OS_ANDROID |
| 16 | 16 |
| 17 namespace blimp { | 17 namespace blimp { |
| 18 namespace client { | 18 namespace client { |
| 19 | 19 |
| 20 // This function is declared in //blimp/client/public/blimp_client_context.h, | 20 // This function is declared in //blimp/client/public/blimp_client_context.h, |
| 21 // and either this function or the one in | 21 // and either this function or the one in |
| 22 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to | 22 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to |
| 23 // any binary using BlimpClientContext::Create. | 23 // any binary using BlimpClientContext::Create. |
| 24 // static | 24 // static |
| 25 BlimpClientContext* BlimpClientContext::Create( | 25 BlimpClientContext* BlimpClientContext::Create( |
| 26 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, | 26 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, |
| 27 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, | 27 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, |
| 28 std::unique_ptr<CompositorDependencies> compositor_dependencies) { | 28 std::unique_ptr<CompositorDependencies> compositor_dependencies, |
| 29 PrefService* local_state) { |
| 29 #if defined(OS_ANDROID) | 30 #if defined(OS_ANDROID) |
| 30 return new DummyBlimpClientContextAndroid(); | 31 return new DummyBlimpClientContextAndroid(); |
| 31 #else | 32 #else |
| 32 return new DummyBlimpClientContext(); | 33 return new DummyBlimpClientContext(); |
| 33 #endif // defined(OS_ANDROID) | 34 #endif // defined(OS_ANDROID) |
| 34 } | 35 } |
| 35 | 36 |
| 37 // This function is declared in //blimp/client/public/blimp_client_context.h, |
| 38 // and either this function or the one in |
| 39 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to |
| 40 // any binary using BlimpClientContext::RegisterPrefs. |
| 41 // static |
| 42 void BlimpClientContext::RegisterPrefs(PrefRegistrySimple* registry) {} |
| 43 |
| 44 // This function is declared in //blimp/client/public/blimp_client_context.h, |
| 45 // and either this function or the one in |
| 46 // //blimp/client/core/blimp_client_context_impl.cc should be linked in to |
| 47 // any binary using BlimpClientContext::ApplyBlimpSwitches. |
| 48 // static |
| 49 void BlimpClientContext::ApplyBlimpSwitches(CommandLinePrefStore* store) {} |
| 50 |
| 36 DummyBlimpClientContext::DummyBlimpClientContext() : BlimpClientContext() { | 51 DummyBlimpClientContext::DummyBlimpClientContext() : BlimpClientContext() { |
| 37 UMA_HISTOGRAM_BOOLEAN("Blimp.Supported", false); | 52 UMA_HISTOGRAM_BOOLEAN("Blimp.Supported", false); |
| 38 } | 53 } |
| 39 | 54 |
| 40 DummyBlimpClientContext::~DummyBlimpClientContext() {} | 55 DummyBlimpClientContext::~DummyBlimpClientContext() {} |
| 41 | 56 |
| 42 void DummyBlimpClientContext::SetDelegate( | 57 void DummyBlimpClientContext::SetDelegate( |
| 43 BlimpClientContextDelegate* delegate) {} | 58 BlimpClientContextDelegate* delegate) {} |
| 44 | 59 |
| 45 std::unique_ptr<BlimpContents> DummyBlimpClientContext::CreateBlimpContents( | 60 std::unique_ptr<BlimpContents> DummyBlimpClientContext::CreateBlimpContents( |
| 46 gfx::NativeWindow window) { | 61 gfx::NativeWindow window) { |
| 47 return nullptr; | 62 return nullptr; |
| 48 } | 63 } |
| 49 | 64 |
| 50 void DummyBlimpClientContext::Connect() { | 65 void DummyBlimpClientContext::Connect() { |
| 51 NOTREACHED(); | 66 NOTREACHED(); |
| 52 } | 67 } |
| 53 | 68 |
| 54 void DummyBlimpClientContext::ConnectWithAssignment( | 69 void DummyBlimpClientContext::ConnectWithAssignment( |
| 55 const Assignment& assignment) { | 70 const Assignment& assignment) { |
| 56 NOTREACHED(); | 71 NOTREACHED(); |
| 57 } | 72 } |
| 58 | 73 |
| 59 } // namespace client | 74 } // namespace client |
| 60 } // namespace blimp | 75 } // namespace blimp |
| OLD | NEW |