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 <math.h> | 5 #include <math.h> |
6 #include "config.h" | 6 #include "config.h" |
7 | 7 |
8 #include "FrameView.h" | 8 #include "FrameView.h" |
9 #include "ScrollView.h" | 9 #include "ScrollView.h" |
10 #include <wtf/Assertions.h> | 10 #include <wtf/Assertions.h> |
11 #undef LOG | 11 #undef LOG |
12 | 12 |
13 #include "webkit/glue/webkitclient_impl.h" | 13 #include "webkit/glue/webkitclient_impl.h" |
14 | 14 |
15 #include "base/file_path.h" | 15 #include "base/file_path.h" |
16 #include "base/file_util.h" | 16 #include "base/file_util.h" |
17 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
| 18 #include "base/process_util.h" |
18 #include "base/platform_file.h" | 19 #include "base/platform_file.h" |
19 #include "base/stats_counters.h" | 20 #include "base/stats_counters.h" |
20 #include "base/string_util.h" | 21 #include "base/string_util.h" |
21 #include "base/trace_event.h" | 22 #include "base/trace_event.h" |
22 #include "grit/webkit_resources.h" | 23 #include "grit/webkit_resources.h" |
23 #include "grit/webkit_strings.h" | 24 #include "grit/webkit_strings.h" |
24 #include "net/base/net_util.h" | 25 #include "net/base/net_util.h" |
25 #include "webkit/api/public/WebCookie.h" | 26 #include "webkit/api/public/WebCookie.h" |
26 #include "webkit/api/public/WebData.h" | 27 #include "webkit/api/public/WebData.h" |
27 #include "webkit/api/public/WebFrameClient.h" | 28 #include "webkit/api/public/WebFrameClient.h" |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 } | 332 } |
332 | 333 |
333 WebKit::WebString WebKitClientImpl::signedPublicKeyAndChallengeString( | 334 WebKit::WebString WebKitClientImpl::signedPublicKeyAndChallengeString( |
334 unsigned key_size_index, | 335 unsigned key_size_index, |
335 const WebKit::WebString& challenge, | 336 const WebKit::WebString& challenge, |
336 const WebKit::WebURL& url) { | 337 const WebKit::WebURL& url) { |
337 NOTREACHED(); | 338 NOTREACHED(); |
338 return WebKit::WebString(); | 339 return WebKit::WebString(); |
339 } | 340 } |
340 | 341 |
| 342 size_t WebKitClientImpl::memoryUsageMB() { |
| 343 using base::ProcessMetrics; |
| 344 static ProcessMetrics* process_metrics = |
| 345 ProcessMetrics::CreateProcessMetrics(base::GetCurrentProcessHandle()); |
| 346 DCHECK(process_metrics); |
| 347 return process_metrics->GetPagefileUsage() >> 20; |
| 348 } |
| 349 |
341 bool WebKitClientImpl::fileExists(const WebKit::WebString& path) { | 350 bool WebKitClientImpl::fileExists(const WebKit::WebString& path) { |
342 FilePath::StringType file_path = webkit_glue::WebStringToFilePathString(path); | 351 FilePath::StringType file_path = webkit_glue::WebStringToFilePathString(path); |
343 return file_util::PathExists(FilePath(file_path)); | 352 return file_util::PathExists(FilePath(file_path)); |
344 } | 353 } |
345 | 354 |
346 bool WebKitClientImpl::deleteFile(const WebKit::WebString& path) { | 355 bool WebKitClientImpl::deleteFile(const WebKit::WebString& path) { |
347 NOTREACHED(); | 356 NOTREACHED(); |
348 return false; | 357 return false; |
349 } | 358 } |
350 | 359 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 // methods will be deleted. | 422 // methods will be deleted. |
414 | 423 |
415 WebCore::String WebKitClientImpl::uiResourceProtocol() { | 424 WebCore::String WebKitClientImpl::uiResourceProtocol() { |
416 return StdStringToString(webkit_glue::GetUIResourceProtocol()); | 425 return StdStringToString(webkit_glue::GetUIResourceProtocol()); |
417 } | 426 } |
418 | 427 |
419 // END(TemporaryGlue) | 428 // END(TemporaryGlue) |
420 //-------------------------------------------------------------------------- | 429 //-------------------------------------------------------------------------- |
421 | 430 |
422 } // namespace webkit_glue | 431 } // namespace webkit_glue |
OLD | NEW |