| 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 "webkit/child/webkitplatformsupport_impl.h" | 5 #include "webkit/child/webkitplatformsupport_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "base/strings/utf_string_conversions.h" | 25 #include "base/strings/utf_string_conversions.h" |
| 26 #include "base/synchronization/lock.h" | 26 #include "base/synchronization/lock.h" |
| 27 #include "base/sys_info.h" | 27 #include "base/sys_info.h" |
| 28 #include "base/time/time.h" | 28 #include "base/time/time.h" |
| 29 #include "grit/blink_resources.h" | 29 #include "grit/blink_resources.h" |
| 30 #include "grit/webkit_resources.h" | 30 #include "grit/webkit_resources.h" |
| 31 #include "grit/webkit_strings.h" | 31 #include "grit/webkit_strings.h" |
| 32 #include "net/base/data_url.h" | 32 #include "net/base/data_url.h" |
| 33 #include "net/base/mime_util.h" | 33 #include "net/base/mime_util.h" |
| 34 #include "net/base/net_errors.h" | 34 #include "net/base/net_errors.h" |
| 35 #include "third_party/WebKit/public/platform/WebCookie.h" | |
| 36 #include "third_party/WebKit/public/platform/WebData.h" | 35 #include "third_party/WebKit/public/platform/WebData.h" |
| 37 #include "third_party/WebKit/public/platform/WebDiscardableMemory.h" | |
| 38 #include "third_party/WebKit/public/platform/WebGestureCurve.h" | |
| 39 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" | |
| 40 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | |
| 41 #include "third_party/WebKit/public/platform/WebString.h" | 36 #include "third_party/WebKit/public/platform/WebString.h" |
| 42 #include "third_party/WebKit/public/platform/WebURL.h" | |
| 43 #include "third_party/WebKit/public/platform/WebVector.h" | |
| 44 #include "third_party/WebKit/public/web/WebFrameClient.h" | |
| 45 #include "third_party/WebKit/public/web/WebInputEvent.h" | |
| 46 #include "ui/base/layout.h" | 37 #include "ui/base/layout.h" |
| 47 #include "webkit/child/webkit_child_helpers.h" | 38 #include "webkit/child/webkit_child_helpers.h" |
| 48 #include "webkit/child/websocketstreamhandle_impl.h" | 39 #include "webkit/child/websocketstreamhandle_impl.h" |
| 49 #include "webkit/child/weburlloader_impl.h" | 40 #include "webkit/child/weburlloader_impl.h" |
| 50 #include "webkit/common/user_agent/user_agent.h" | 41 #include "webkit/common/user_agent/user_agent.h" |
| 51 | 42 |
| 52 #if defined(OS_ANDROID) | 43 #if defined(OS_ANDROID) |
| 53 #include "base/android/sys_utils.h" | 44 #include "base/android/sys_utils.h" |
| 54 #endif | 45 #endif |
| 55 | 46 |
| 56 #if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN) | 47 #if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN) |
| 57 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" | 48 #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h" |
| 58 #endif | 49 #endif |
| 59 | 50 |
| 60 using blink::WebAudioBus; | |
| 61 using blink::WebCookie; | |
| 62 using blink::WebData; | 51 using blink::WebData; |
| 63 using blink::WebLocalizedString; | 52 using blink::WebLocalizedString; |
| 64 using blink::WebPluginListBuilder; | |
| 65 using blink::WebString; | 53 using blink::WebString; |
| 66 using blink::WebSocketStreamHandle; | 54 using blink::WebSocketStreamHandle; |
| 67 using blink::WebURL; | 55 using blink::WebURL; |
| 68 using blink::WebURLError; | 56 using blink::WebURLError; |
| 69 using blink::WebURLLoader; | 57 using blink::WebURLLoader; |
| 70 using blink::WebVector; | |
| 71 | 58 |
| 72 namespace { | 59 namespace { |
| 73 | 60 |
| 74 // A simple class to cache the memory usage for a given amount of time. | 61 // A simple class to cache the memory usage for a given amount of time. |
| 75 class MemoryUsageCache { | 62 class MemoryUsageCache { |
| 76 public: | 63 public: |
| 77 // Retrieves the Singleton. | 64 // Retrieves the Singleton. |
| 78 static MemoryUsageCache* GetInstance() { | 65 static MemoryUsageCache* GetInstance() { |
| 79 return Singleton<MemoryUsageCache>::get(); | 66 return Singleton<MemoryUsageCache>::get(); |
| 80 } | 67 } |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 if (--shared_timer_suspended_ == 0 && | 909 if (--shared_timer_suspended_ == 0 && |
| 923 (!shared_timer_.IsRunning() || | 910 (!shared_timer_.IsRunning() || |
| 924 shared_timer_fire_time_was_set_while_suspended_)) { | 911 shared_timer_fire_time_was_set_while_suspended_)) { |
| 925 shared_timer_fire_time_was_set_while_suspended_ = false; | 912 shared_timer_fire_time_was_set_while_suspended_ = false; |
| 926 setSharedTimerFireInterval( | 913 setSharedTimerFireInterval( |
| 927 shared_timer_fire_time_ - monotonicallyIncreasingTime()); | 914 shared_timer_fire_time_ - monotonicallyIncreasingTime()); |
| 928 } | 915 } |
| 929 } | 916 } |
| 930 | 917 |
| 931 } // namespace webkit_glue | 918 } // namespace webkit_glue |
| OLD | NEW |