| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 148   if (command_line->HasSwitch("single-process")) | 148   if (command_line->HasSwitch("single-process")) | 
| 149     initialize_ui = false; | 149     initialize_ui = false; | 
| 150 #endif | 150 #endif | 
| 151   if (initialize_ui) { | 151   if (initialize_ui) { | 
| 152     ui::RegisterPathProvider(); | 152     ui::RegisterPathProvider(); | 
| 153     base::File pak_file_2 = pak_file.Duplicate(); | 153     base::File pak_file_2 = pak_file.Duplicate(); | 
| 154     ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( | 154     ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( | 
| 155       pak_file_2.Pass(), base::MemoryMappedFile::Region::kWholeFile); | 155       pak_file_2.Pass(), base::MemoryMappedFile::Region::kWholeFile); | 
| 156   } | 156   } | 
| 157 | 157 | 
| 158   mojo::logging::InitLogging(); | 158   mojo::InitLogging(); | 
| 159 | 159 | 
| 160   if (command_line->HasSwitch(kDisableEncryptedMedia)) | 160   if (command_line->HasSwitch(kDisableEncryptedMedia)) | 
| 161     blink::WebRuntimeFeatures::enableEncryptedMedia(false); | 161     blink::WebRuntimeFeatures::enableEncryptedMedia(false); | 
| 162 | 162 | 
| 163   blink_settings_->Init(); | 163   blink_settings_->Init(); | 
| 164 | 164 | 
| 165   // TODO(sky): why is this always using 100? | 165   // TODO(sky): why is this always using 100? | 
| 166   ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 166   ui::ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 
| 167       pak_file.Pass(), ui::SCALE_FACTOR_100P); | 167       pak_file.Pass(), ui::SCALE_FACTOR_100P); | 
| 168 | 168 | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 185   return gpu_info_.get(); | 185   return gpu_info_.get(); | 
| 186 } | 186 } | 
| 187 | 187 | 
| 188 void GlobalState::GetGpuInfoCallback(mus::mojom::GpuInfoPtr gpu_info) { | 188 void GlobalState::GetGpuInfoCallback(mus::mojom::GpuInfoPtr gpu_info) { | 
| 189   CHECK(gpu_info); | 189   CHECK(gpu_info); | 
| 190   gpu_info_ = gpu_info.Pass(); | 190   gpu_info_ = gpu_info.Pass(); | 
| 191   gpu_service_.reset(); | 191   gpu_service_.reset(); | 
| 192 } | 192 } | 
| 193 | 193 | 
| 194 }  // namespace html_viewer | 194 }  // namespace html_viewer | 
| OLD | NEW | 
|---|