Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: webkit/glue/webkitclient_impl.cc

Issue 3056029: Move the number conversions from string_util to a new file.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include <math.h> 11 #include <math.h>
12 12
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/lock.h" 15 #include "base/lock.h"
16 #include "base/message_loop.h" 16 #include "base/message_loop.h"
17 #include "base/process_util.h" 17 #include "base/process_util.h"
18 #include "base/platform_file.h" 18 #include "base/platform_file.h"
19 #include "base/singleton.h" 19 #include "base/singleton.h"
20 #include "base/stats_counters.h" 20 #include "base/stats_counters.h"
21 #include "base/string_number_conversions.h"
21 #include "base/string_util.h" 22 #include "base/string_util.h"
22 #include "base/time.h" 23 #include "base/time.h"
23 #include "base/utf_string_conversions.h" 24 #include "base/utf_string_conversions.h"
24 #include "base/trace_event.h" 25 #include "base/trace_event.h"
25 #include "grit/webkit_resources.h" 26 #include "grit/webkit_resources.h"
26 #include "grit/webkit_strings.h" 27 #include "grit/webkit_strings.h"
27 #include "third_party/WebKit/WebKit/chromium/public/WebCookie.h" 28 #include "third_party/WebKit/WebKit/chromium/public/WebCookie.h"
28 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" 29 #include "third_party/WebKit/WebKit/chromium/public/WebData.h"
29 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h" 30 #include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h"
30 #include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h" 31 #include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 return WebString(); 301 return WebString();
301 return GetLocalizedString(message_id); 302 return GetLocalizedString(message_id);
302 } 303 }
303 304
304 WebString WebKitClientImpl::queryLocalizedString( 305 WebString WebKitClientImpl::queryLocalizedString(
305 WebLocalizedString::Name name, int numeric_value) { 306 WebLocalizedString::Name name, int numeric_value) {
306 int message_id = ToMessageID(name); 307 int message_id = ToMessageID(name);
307 if (message_id < 0) 308 if (message_id < 0)
308 return WebString(); 309 return WebString();
309 return ReplaceStringPlaceholders(GetLocalizedString(message_id), 310 return ReplaceStringPlaceholders(GetLocalizedString(message_id),
310 IntToString16(numeric_value), 311 base::IntToString16(numeric_value),
311 NULL); 312 NULL);
312 } 313 }
313 314
314 double WebKitClientImpl::currentTime() { 315 double WebKitClientImpl::currentTime() {
315 return base::Time::Now().ToDoubleT(); 316 return base::Time::Now().ToDoubleT();
316 } 317 }
317 318
318 void WebKitClientImpl::setSharedTimerFiredFunction(void (*func)()) { 319 void WebKitClientImpl::setSharedTimerFiredFunction(void (*func)()) {
319 shared_timer_func_ = func; 320 shared_timer_func_ = func;
320 } 321 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 ++shared_timer_suspended_; 443 ++shared_timer_suspended_;
443 } 444 }
444 445
445 void WebKitClientImpl::ResumeSharedTimer() { 446 void WebKitClientImpl::ResumeSharedTimer() {
446 // The shared timer may have fired or been adjusted while we were suspended. 447 // The shared timer may have fired or been adjusted while we were suspended.
447 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning()) 448 if (--shared_timer_suspended_ == 0 && !shared_timer_.IsRunning())
448 setSharedTimerFireTime(shared_timer_fire_time_); 449 setSharedTimerFireTime(shared_timer_fire_time_);
449 } 450 }
450 451
451 } // namespace webkit_glue 452 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/plugins/webplugin_delegate_impl_win.cc ('k') | webkit/tools/test_shell/node_leak_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698