| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "webkit/glue/webkitclient_impl.h" | 5 #include "webkit/glue/webkitclient_impl.h" |
| 6 | 6 |
| 7 #if defined(OS_LINUX) | 7 #if defined(OS_LINUX) |
| 8 #include <malloc.h> | 8 #include <malloc.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 { "linuxProgressBorderRight", IDR_PROGRESS_BORDER_RIGHT }, | 273 { "linuxProgressBorderRight", IDR_PROGRESS_BORDER_RIGHT }, |
| 274 { "linuxProgressValue", IDR_PROGRESS_VALUE }, | 274 { "linuxProgressValue", IDR_PROGRESS_VALUE }, |
| 275 #endif | 275 #endif |
| 276 }; | 276 }; |
| 277 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { | 277 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) { |
| 278 if (!strcmp(name, resources[i].name)) { | 278 if (!strcmp(name, resources[i].name)) { |
| 279 base::StringPiece resource = GetDataResource(resources[i].id); | 279 base::StringPiece resource = GetDataResource(resources[i].id); |
| 280 return WebData(resource.data(), resource.size()); | 280 return WebData(resource.data(), resource.size()); |
| 281 } | 281 } |
| 282 } | 282 } |
| 283 NOTREACHED() << "Unknown image resource " << name; | 283 // TODO(jhawkins): Restore this NOTREACHED once WK stops sending in empty |
| 284 // strings. http://crbug.com/50675. |
| 285 //NOTREACHED() << "Unknown image resource " << name; |
| 284 return WebData(); | 286 return WebData(); |
| 285 } | 287 } |
| 286 | 288 |
| 287 WebString WebKitClientImpl::queryLocalizedString( | 289 WebString WebKitClientImpl::queryLocalizedString( |
| 288 WebLocalizedString::Name name) { | 290 WebLocalizedString::Name name) { |
| 289 int message_id = ToMessageID(name); | 291 int message_id = ToMessageID(name); |
| 290 if (message_id < 0) | 292 if (message_id < 0) |
| 291 return WebString(); | 293 return WebString(); |
| 292 return GetLocalizedString(message_id); | 294 return GetLocalizedString(message_id); |
| 293 } | 295 } |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 ++shared_timer_suspended_; | 435 ++shared_timer_suspended_; |
| 434 } | 436 } |
| 435 | 437 |
| 436 void WebKitClientImpl::ResumeSharedTimer() { | 438 void WebKitClientImpl::ResumeSharedTimer() { |
| 437 // The shared timer may have fired or been adjusted while we were suspended. | 439 // The shared timer may have fired or been adjusted while we were suspended. |
| 438 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) | 440 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) |
| 439 setSharedTimerFireTime(shared_timer_fire_time_); | 441 setSharedTimerFireTime(shared_timer_fire_time_); |
| 440 } | 442 } |
| 441 | 443 |
| 442 } // namespace webkit_glue | 444 } // namespace webkit_glue |
| OLD | NEW |