OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 return 0; // Invalid resolved URL. | 595 return 0; // Invalid resolved URL. |
596 | 596 |
597 return webKitClient()->visitedLinkHash(buffer.data(), buffer.length()); | 597 return webKitClient()->visitedLinkHash(buffer.data(), buffer.length()); |
598 } | 598 } |
599 | 599 |
600 bool ChromiumBridge::isLinkVisited(LinkHash visitedLinkHash) | 600 bool ChromiumBridge::isLinkVisited(LinkHash visitedLinkHash) |
601 { | 601 { |
602 return webKitClient()->isLinkVisited(visitedLinkHash); | 602 return webKitClient()->isLinkVisited(visitedLinkHash); |
603 } | 603 } |
604 | 604 |
605 // These are temporary methoeds that the WebKit layer can use to call to the | 605 // These are temporary methods that the WebKit layer can use to call to the |
606 // Glue layer. Once the Glue layer moves entirely into the WebKit layer, these | 606 // Glue layer. Once the Glue layer moves entirely into the WebKit layer, these |
607 // methods will be deleted. | 607 // methods will be deleted. |
608 | 608 |
609 String ChromiumBridge::uiResourceProtocol() | 609 String ChromiumBridge::uiResourceProtocol() |
610 { | 610 { |
611 return webKitClient()->uiResourceProtocol(); | 611 return webKitClient()->uiResourceProtocol(); |
612 } | 612 } |
613 | 613 |
614 void ChromiumBridge::notifyJSOutOfMemory(Frame* frame) | 614 void ChromiumBridge::notifyJSOutOfMemory(Frame* frame) |
615 { | 615 { |
616 if (!frame) | 616 if (!frame) |
617 return; | 617 return; |
618 | 618 |
619 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); | 619 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(frame); |
620 if (!webFrame->client()) | 620 if (!webFrame->client()) |
621 return; | 621 return; |
622 webFrame->client()->didExhaustMemoryAvailableForScript(webFrame); | 622 webFrame->client()->didExhaustMemoryAvailableForScript(webFrame); |
623 } | 623 } |
624 | 624 |
| 625 int ChromiumBridge::memoryUsageMB() |
| 626 { |
| 627 return static_cast<int>(webKitClient()->memoryUsageMB()); |
| 628 } |
| 629 |
625 int ChromiumBridge::screenDepth(Widget* widget) | 630 int ChromiumBridge::screenDepth(Widget* widget) |
626 { | 631 { |
627 WebWidgetClient* client = toWebWidgetClient(widget); | 632 WebWidgetClient* client = toWebWidgetClient(widget); |
628 if (!client) | 633 if (!client) |
629 return 0; | 634 return 0; |
630 return client->screenInfo().depth; | 635 return client->screenInfo().depth; |
631 } | 636 } |
632 | 637 |
633 int ChromiumBridge::screenDepthPerComponent(Widget* widget) | 638 int ChromiumBridge::screenDepthPerComponent(Widget* widget) |
634 { | 639 { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 if (client) | 686 if (client) |
682 client->focus(); | 687 client->focus(); |
683 } | 688 } |
684 | 689 |
685 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) | 690 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) |
686 { | 691 { |
687 return WebWorkerClientImpl::createWorkerContextProxy(worker); | 692 return WebWorkerClientImpl::createWorkerContextProxy(worker); |
688 } | 693 } |
689 | 694 |
690 } // namespace WebCore | 695 } // namespace WebCore |
OLD | NEW |