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/setup.h" | 5 #include "components/html_viewer/setup.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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 resource_loader_.ReleaseFile(kResourceResourcesPak), | 142 resource_loader_.ReleaseFile(kResourceResourcesPak), |
143 base::MemoryMappedFile::Region::kWholeFile); | 143 base::MemoryMappedFile::Region::kWholeFile); |
144 // TODO(sky): why is this always using 100? | 144 // TODO(sky): why is this always using 100? |
145 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 145 ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
146 resource_loader_.ReleaseFile(kResourceUIPak), ui::SCALE_FACTOR_100P); | 146 resource_loader_.ReleaseFile(kResourceUIPak), ui::SCALE_FACTOR_100P); |
147 } | 147 } |
148 | 148 |
149 compositor_thread_.Start(); | 149 compositor_thread_.Start(); |
150 | 150 |
151 media_factory_.reset( | 151 media_factory_.reset( |
152 new MediaFactory(compositor_thread_.message_loop_proxy(), app_->shell())); | 152 new MediaFactory(compositor_thread_.task_runner(), app_->shell())); |
153 | 153 |
154 if (command_line->HasSwitch(kJavaScriptFlags)) { | 154 if (command_line->HasSwitch(kJavaScriptFlags)) { |
155 std::string flags(command_line->GetSwitchValueASCII(kJavaScriptFlags)); | 155 std::string flags(command_line->GetSwitchValueASCII(kJavaScriptFlags)); |
156 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); | 156 v8::V8::SetFlagsFromString(flags.c_str(), static_cast<int>(flags.size())); |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 } // namespace html_viewer | 160 } // namespace html_viewer |
OLD | NEW |