| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 case WebLocalizedString::ValidationPatternMismatch: | 184 case WebLocalizedString::ValidationPatternMismatch: |
| 185 return IDS_FORM_VALIDATION_PATTERN_MISMATCH; | 185 return IDS_FORM_VALIDATION_PATTERN_MISMATCH; |
| 186 case WebLocalizedString::ValidationTooLong: | 186 case WebLocalizedString::ValidationTooLong: |
| 187 return IDS_FORM_VALIDATION_TOO_LONG; | 187 return IDS_FORM_VALIDATION_TOO_LONG; |
| 188 case WebLocalizedString::ValidationRangeUnderflow: | 188 case WebLocalizedString::ValidationRangeUnderflow: |
| 189 return IDS_FORM_VALIDATION_RANGE_UNDERFLOW; | 189 return IDS_FORM_VALIDATION_RANGE_UNDERFLOW; |
| 190 case WebLocalizedString::ValidationRangeOverflow: | 190 case WebLocalizedString::ValidationRangeOverflow: |
| 191 return IDS_FORM_VALIDATION_RANGE_OVERFLOW; | 191 return IDS_FORM_VALIDATION_RANGE_OVERFLOW; |
| 192 case WebLocalizedString::ValidationStepMismatch: | 192 case WebLocalizedString::ValidationStepMismatch: |
| 193 return IDS_FORM_VALIDATION_STEP_MISMATCH; | 193 return IDS_FORM_VALIDATION_STEP_MISMATCH; |
| 194 // TODO(haraken): Remove default: when we merge the next |
| 195 // WebLocalizedString.h change in WebKit. |
| 196 default: |
| 197 break; |
| 194 } | 198 } |
| 195 return -1; | 199 return -1; |
| 196 } | 200 } |
| 197 | 201 |
| 198 WebKitClientImpl::WebKitClientImpl() | 202 WebKitClientImpl::WebKitClientImpl() |
| 199 : main_loop_(MessageLoop::current()), | 203 : main_loop_(MessageLoop::current()), |
| 200 shared_timer_func_(NULL), | 204 shared_timer_func_(NULL), |
| 201 shared_timer_fire_time_(0.0), | 205 shared_timer_fire_time_(0.0), |
| 202 shared_timer_suspended_(0) { | 206 shared_timer_suspended_(0) { |
| 203 } | 207 } |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 ++shared_timer_suspended_; | 595 ++shared_timer_suspended_; |
| 592 } | 596 } |
| 593 | 597 |
| 594 void WebKitClientImpl::ResumeSharedTimer() { | 598 void WebKitClientImpl::ResumeSharedTimer() { |
| 595 // The shared timer may have fired or been adjusted while we were suspended. | 599 // The shared timer may have fired or been adjusted while we were suspended. |
| 596 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) | 600 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) |
| 597 setSharedTimerFireTime(shared_timer_fire_time_); | 601 setSharedTimerFireTime(shared_timer_fire_time_); |
| 598 } | 602 } |
| 599 | 603 |
| 600 } // namespace webkit_glue | 604 } // namespace webkit_glue |
| OLD | NEW |