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 4409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4514 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4515 void WebViewImpl::forceNextWebGLContextCreationToFail() |
4515 { | 4516 { |
4516 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4517 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
4517 } | 4518 } |
4518 | 4519 |
4519 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4520 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
4520 { | 4521 { |
4521 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4522 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
4522 } | 4523 } |
4523 | 4524 |
| 4525 void WebViewImpl::updateBatteryStatusForTesting(bool charging, double chargingTi
me, double dischargingTime, double level) |
| 4526 { |
| 4527 BatteryDispatcher::instance().OnUpdateBatteryStatus( |
| 4528 BatteryStatus(charging, chargingTime, dischargingTime, level)); |
| 4529 } |
| 4530 |
| 4531 void WebViewImpl::resetBatteryStatusForTesting() |
| 4532 { |
| 4533 BatteryDispatcher::instance().OnUpdateBatteryStatus(BatteryStatus()); |
| 4534 } |
| 4535 |
4524 void WebViewImpl::updatePageOverlays() | 4536 void WebViewImpl::updatePageOverlays() |
4525 { | 4537 { |
4526 if (m_pageColorOverlay) | 4538 if (m_pageColorOverlay) |
4527 m_pageColorOverlay->update(); | 4539 m_pageColorOverlay->update(); |
4528 if (InspectorOverlay* overlay = inspectorOverlay()) { | 4540 if (InspectorOverlay* overlay = inspectorOverlay()) { |
4529 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4541 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
4530 if (inspectorPageOverlay) | 4542 if (inspectorPageOverlay) |
4531 inspectorPageOverlay->update(); | 4543 inspectorPageOverlay->update(); |
4532 } | 4544 } |
4533 } | 4545 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4567 { | 4579 { |
4568 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than | 4580 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa
ctor rather than |
4569 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4581 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
4570 if (!page()) | 4582 if (!page()) |
4571 return 1; | 4583 return 1; |
4572 | 4584 |
4573 return page()->deviceScaleFactor(); | 4585 return page()->deviceScaleFactor(); |
4574 } | 4586 } |
4575 | 4587 |
4576 } // namespace blink | 4588 } // namespace blink |
OLD | NEW |