OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/shell_main_delegate.h" | 5 #include "content/shell/shell_main_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 } | 88 } |
89 | 89 |
90 void ShellMainDelegate::InitializeResourceBundle() { | 90 void ShellMainDelegate::InitializeResourceBundle() { |
91 FilePath pak_file; | 91 FilePath pak_file; |
92 #if defined(OS_MACOSX) | 92 #if defined(OS_MACOSX) |
93 pak_file = GetResourcesPakFilePath(); | 93 pak_file = GetResourcesPakFilePath(); |
94 #else | 94 #else |
95 FilePath pak_dir; | 95 FilePath pak_dir; |
96 | 96 |
97 #if defined(OS_ANDROID) | 97 #if defined(OS_ANDROID) |
98 DCHECK(PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_dir)); | 98 bool got_path = PathService::Get(base::DIR_ANDROID_APP_DATA, &pak_dir); |
| 99 DCHECK(got_path); |
99 pak_dir = pak_dir.Append(FILE_PATH_LITERAL("paks")); | 100 pak_dir = pak_dir.Append(FILE_PATH_LITERAL("paks")); |
100 #else | 101 #else |
101 PathService::Get(base::DIR_MODULE, &pak_dir); | 102 PathService::Get(base::DIR_MODULE, &pak_dir); |
102 #endif | 103 #endif |
103 | 104 |
104 pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); | 105 pak_file = pak_dir.Append(FILE_PATH_LITERAL("content_shell.pak")); |
105 #endif | 106 #endif |
106 ui::ResourceBundle::InitSharedInstanceWithPakFile(pak_file); | 107 ui::ResourceBundle::InitSharedInstanceWithPakFile(pak_file); |
107 } | 108 } |
108 | 109 |
109 content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { | 110 content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { |
110 browser_client_.reset(new content::ShellContentBrowserClient); | 111 browser_client_.reset(new content::ShellContentBrowserClient); |
111 return browser_client_.get(); | 112 return browser_client_.get(); |
112 } | 113 } |
113 | 114 |
114 content::ContentRendererClient* | 115 content::ContentRendererClient* |
115 ShellMainDelegate::CreateContentRendererClient() { | 116 ShellMainDelegate::CreateContentRendererClient() { |
116 renderer_client_.reset(new content::ShellContentRendererClient); | 117 renderer_client_.reset(new content::ShellContentRendererClient); |
117 return renderer_client_.get(); | 118 return renderer_client_.get(); |
118 } | 119 } |
OLD | NEW |