| 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 "blimp/engine/app/blimp_content_main_delegate.h" | 5 #include "blimp/engine/app/blimp_content_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 71 } |
| 72 | 72 |
| 73 void BlimpContentMainDelegate::InitializeResourceBundle() { | 73 void BlimpContentMainDelegate::InitializeResourceBundle() { |
| 74 base::FilePath pak_file; | 74 base::FilePath pak_file; |
| 75 bool pak_file_valid = PathService::Get(base::DIR_MODULE, &pak_file); | 75 bool pak_file_valid = PathService::Get(base::DIR_MODULE, &pak_file); |
| 76 CHECK(pak_file_valid); | 76 CHECK(pak_file_valid); |
| 77 pak_file = pak_file.Append(FILE_PATH_LITERAL("blimp_engine.pak")); | 77 pak_file = pak_file.Append(FILE_PATH_LITERAL("blimp_engine.pak")); |
| 78 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); | 78 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void BlimpContentMainDelegate::SetContentBrowserClientForTesting( |
| 82 std::unique_ptr<BlimpContentBrowserClient> browser_client_ptr) { |
| 83 browser_client_ = std::move(browser_client_ptr); |
| 84 } |
| 85 |
| 81 content::ContentBrowserClient* | 86 content::ContentBrowserClient* |
| 82 BlimpContentMainDelegate::CreateContentBrowserClient() { | 87 BlimpContentMainDelegate::CreateContentBrowserClient() { |
| 83 DCHECK(!browser_client_); | 88 DCHECK(!browser_client_); |
| 84 browser_client_.reset(new BlimpContentBrowserClient); | 89 browser_client_.reset(new BlimpContentBrowserClient); |
| 85 return browser_client_.get(); | 90 return browser_client_.get(); |
| 86 } | 91 } |
| 87 | 92 |
| 88 content::ContentRendererClient* | 93 content::ContentRendererClient* |
| 89 BlimpContentMainDelegate::CreateContentRendererClient() { | 94 BlimpContentMainDelegate::CreateContentRendererClient() { |
| 90 DCHECK(!renderer_client_); | 95 DCHECK(!renderer_client_); |
| 91 renderer_client_.reset(new BlimpContentRendererClient); | 96 renderer_client_.reset(new BlimpContentRendererClient); |
| 92 return renderer_client_.get(); | 97 return renderer_client_.get(); |
| 93 } | 98 } |
| 94 | 99 |
| 95 } // namespace engine | 100 } // namespace engine |
| 96 } // namespace blimp | 101 } // namespace blimp |
| OLD | NEW |