| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/html_viewer/global_state.h" | 5 #include "components/html_viewer/global_state.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 new MediaFactory(compositor_thread_.task_runner(), app_->shell())); | 168 new MediaFactory(compositor_thread_.task_runner(), app_->shell())); |
| 169 | 169 |
| 170 if (command_line->HasSwitch(kJavaScriptFlags)) { | 170 if (command_line->HasSwitch(kJavaScriptFlags)) { |
| 171 std::string flags(command_line->GetSwitchValueASCII(kJavaScriptFlags)); | 171 std::string flags(command_line->GetSwitchValueASCII(kJavaScriptFlags)); |
| 172 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 172 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 // TODO(rjkroege): These two functions probably do not interoperate correctly | 176 // TODO(rjkroege): These two functions probably do not interoperate correctly |
| 177 // with MUS. | 177 // with MUS. |
| 178 const mojo::GpuInfo* GlobalState::GetGpuInfo() { | 178 const mus::mojom::GpuInfo* GlobalState::GetGpuInfo() { |
| 179 if (gpu_service_) | 179 if (gpu_service_) |
| 180 CHECK(gpu_service_.WaitForIncomingResponse()) <<"Get GPU info failed!"; | 180 CHECK(gpu_service_.WaitForIncomingResponse()) <<"Get GPU info failed!"; |
| 181 return gpu_info_.get(); | 181 return gpu_info_.get(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void GlobalState::GetGpuInfoCallback(mojo::GpuInfoPtr gpu_info) { | 184 void GlobalState::GetGpuInfoCallback(mus::mojom::GpuInfoPtr gpu_info) { |
| 185 CHECK(gpu_info); | 185 CHECK(gpu_info); |
| 186 gpu_info_ = gpu_info.Pass(); | 186 gpu_info_ = gpu_info.Pass(); |
| 187 gpu_service_.reset(); | 187 gpu_service_.reset(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace html_viewer | 190 } // namespace html_viewer |
| OLD | NEW |