| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/glue/webkitclient_impl.h" | 5 #include "webkit/glue/webkitclient_impl.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 { "linuxCheckboxDisabledOff", IDR_LINUX_CHECKBOX_DISABLED_OFF }, | 178 { "linuxCheckboxDisabledOff", IDR_LINUX_CHECKBOX_DISABLED_OFF }, |
| 179 { "linuxCheckboxDisabledOn", IDR_LINUX_CHECKBOX_DISABLED_ON }, | 179 { "linuxCheckboxDisabledOn", IDR_LINUX_CHECKBOX_DISABLED_ON }, |
| 180 { "linuxRadioOff", IDR_LINUX_RADIO_OFF }, | 180 { "linuxRadioOff", IDR_LINUX_RADIO_OFF }, |
| 181 { "linuxRadioOn", IDR_LINUX_RADIO_ON }, | 181 { "linuxRadioOn", IDR_LINUX_RADIO_ON }, |
| 182 { "linuxRadioDisabledOff", IDR_LINUX_RADIO_DISABLED_OFF }, | 182 { "linuxRadioDisabledOff", IDR_LINUX_RADIO_DISABLED_OFF }, |
| 183 { "linuxRadioDisabledOn", IDR_LINUX_RADIO_DISABLED_ON }, | 183 { "linuxRadioDisabledOn", IDR_LINUX_RADIO_DISABLED_ON }, |
| 184 #endif | 184 #endif |
| 185 }; | 185 }; |
| 186 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { | 186 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { |
| 187 if (!strcmp(name, resources[i].name)) { | 187 if (!strcmp(name, resources[i].name)) { |
| 188 StringPiece resource = GetDataResource(resources[i].id); | 188 base::StringPiece resource = GetDataResource(resources[i].id); |
| 189 return WebData(resource.data(), resource.size()); | 189 return WebData(resource.data(), resource.size()); |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 NOTREACHED() << "Unknown image resource " << name; | 192 NOTREACHED() << "Unknown image resource " << name; |
| 193 return WebData(); | 193 return WebData(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 WebString WebKitClientImpl::queryLocalizedString( | 196 WebString WebKitClientImpl::queryLocalizedString( |
| 197 WebLocalizedString::Name name) { | 197 WebLocalizedString::Name name) { |
| 198 int message_id = ToMessageID(name); | 198 int message_id = ToMessageID(name); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool WebKitClientImpl::makeAllDirectories( | 305 bool WebKitClientImpl::makeAllDirectories( |
| 306 const WebKit::WebString& path) { | 306 const WebKit::WebString& path) { |
| 307 DCHECK(!sandboxEnabled()); | 307 DCHECK(!sandboxEnabled()); |
| 308 FilePath::StringType file_path = webkit_glue::WebStringToFilePathString(path); | 308 FilePath::StringType file_path = webkit_glue::WebStringToFilePathString(path); |
| 309 return file_util::CreateDirectory(FilePath(file_path)); | 309 return file_util::CreateDirectory(FilePath(file_path)); |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace webkit_glue | 312 } // namespace webkit_glue |
| OLD | NEW |