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