OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 #include "core/page/Page.h" | 85 #include "core/page/Page.h" |
86 #include "core/page/PagePopupClient.h" | 86 #include "core/page/PagePopupClient.h" |
87 #include "core/page/PointerLockController.h" | 87 #include "core/page/PointerLockController.h" |
88 #include "core/page/ScopedPageLoadDeferrer.h" | 88 #include "core/page/ScopedPageLoadDeferrer.h" |
89 #include "core/page/TouchDisambiguation.h" | 89 #include "core/page/TouchDisambiguation.h" |
90 #include "core/paint/PaintLayer.h" | 90 #include "core/paint/PaintLayer.h" |
91 #include "core/timing/DOMWindowPerformance.h" | 91 #include "core/timing/DOMWindowPerformance.h" |
92 #include "core/timing/Performance.h" | 92 #include "core/timing/Performance.h" |
93 #include "modules/accessibility/AXObject.h" | 93 #include "modules/accessibility/AXObject.h" |
94 #include "modules/accessibility/AXObjectCacheImpl.h" | 94 #include "modules/accessibility/AXObjectCacheImpl.h" |
| 95 #include "modules/battery/BatteryDispatcher.h" |
95 #include "modules/credentialmanager/CredentialManagerClient.h" | 96 #include "modules/credentialmanager/CredentialManagerClient.h" |
96 #include "modules/encryptedmedia/MediaKeysController.h" | 97 #include "modules/encryptedmedia/MediaKeysController.h" |
97 #include "modules/storage/StorageNamespaceController.h" | 98 #include "modules/storage/StorageNamespaceController.h" |
98 #include "modules/webgl/WebGLRenderingContext.h" | 99 #include "modules/webgl/WebGLRenderingContext.h" |
99 #include "platform/ContextMenu.h" | 100 #include "platform/ContextMenu.h" |
100 #include "platform/ContextMenuItem.h" | 101 #include "platform/ContextMenuItem.h" |
101 #include "platform/Cursor.h" | 102 #include "platform/Cursor.h" |
102 #include "platform/Histogram.h" | 103 #include "platform/Histogram.h" |
103 #include "platform/KeyboardCodes.h" | 104 #include "platform/KeyboardCodes.h" |
104 #include "platform/Logging.h" | 105 #include "platform/Logging.h" |
(...skipping 4405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4510 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4511 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4511 { | 4512 { |
4512 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4513 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4513 } | 4514 } |
4514 | 4515 |
4515 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4516 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
4516 { | 4517 { |
4517 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4518 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
4518 } | 4519 } |
4519 | 4520 |
| 4521 void WebViewImpl::updateBatteryStatusForTesting(bool charging, double chargingTi
me, double dischargingTime, double level) |
| 4522 { |
| 4523 BatteryDispatcher::instance().OnUpdateBatteryStatus( |
| 4524 BatteryStatus(charging, chargingTime, dischargingTime, level)); |
| 4525 } |
| 4526 |
| 4527 void WebViewImpl::resetBatteryStatusForTesting() |
| 4528 { |
| 4529 BatteryDispatcher::instance().OnUpdateBatteryStatus(BatteryStatus()); |
| 4530 } |
| 4531 |
4520 void WebViewImpl::updatePageOverlays() | 4532 void WebViewImpl::updatePageOverlays() |
4521 { | 4533 { |
4522 if (m_pageColorOverlay) | 4534 if (m_pageColorOverlay) |
4523 m_pageColorOverlay->update(); | 4535 m_pageColorOverlay->update(); |
4524 if (InspectorOverlay* overlay = inspectorOverlay()) { | 4536 if (InspectorOverlay* overlay = inspectorOverlay()) { |
4525 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4537 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
4526 if (inspectorPageOverlay) | 4538 if (inspectorPageOverlay) |
4527 inspectorPageOverlay->update(); | 4539 inspectorPageOverlay->update(); |
4528 } | 4540 } |
4529 } | 4541 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4563 { | 4575 { |
4564 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4576 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4565 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4577 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4566 if (!page()) | 4578 if (!page()) |
4567 return 1; | 4579 return 1; |
4568 | 4580 |
4569 return page()->deviceScaleFactor(); | 4581 return page()->deviceScaleFactor(); |
4570 } | 4582 } |
4571 | 4583 |
4572 } // namespace blink | 4584 } // namespace blink |
OLD | NEW |