Chromium Code Reviews| 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 4414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4519 void WebViewImpl::forceNextWebGLContextCreationToFail() | 4520 void WebViewImpl::forceNextWebGLContextCreationToFail() |
| 4520 { | 4521 { |
| 4521 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); | 4522 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); |
| 4522 } | 4523 } |
| 4523 | 4524 |
| 4524 void WebViewImpl::forceNextDrawingBufferCreationToFail() | 4525 void WebViewImpl::forceNextDrawingBufferCreationToFail() |
| 4525 { | 4526 { |
| 4526 DrawingBuffer::forceNextDrawingBufferCreationToFail(); | 4527 DrawingBuffer::forceNextDrawingBufferCreationToFail(); |
| 4527 } | 4528 } |
| 4528 | 4529 |
| 4530 void WebViewImpl::updateBatteryStatusForTesting(bool charging, double chargingTi me, double dischargingTime, double level) | |
| 4531 { | |
| 4532 BatteryDispatcher::instance().OnUpdateBatteryStatus( | |
|
esprehn
2016/02/18 06:48:13
This should be exposed in the platform API, not th
haraken
2016/02/18 11:38:04
Just to confirm: Do you mean public/web/? This is
| |
| 4533 BatteryStatus(charging, chargingTime, dischargingTime, level)); | |
| 4534 } | |
| 4535 | |
| 4536 void WebViewImpl::resetBatteryStatusForTesting() | |
|
esprehn
2016/02/18 06:48:13
Ditto
| |
| 4537 { | |
| 4538 BatteryDispatcher::instance().OnUpdateBatteryStatus(BatteryStatus()); | |
| 4539 } | |
| 4540 | |
| 4529 void WebViewImpl::updatePageOverlays() | 4541 void WebViewImpl::updatePageOverlays() |
| 4530 { | 4542 { |
| 4531 if (m_pageColorOverlay) | 4543 if (m_pageColorOverlay) |
| 4532 m_pageColorOverlay->update(); | 4544 m_pageColorOverlay->update(); |
| 4533 if (InspectorOverlay* overlay = inspectorOverlay()) { | 4545 if (InspectorOverlay* overlay = inspectorOverlay()) { |
| 4534 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); | 4546 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); |
| 4535 if (inspectorPageOverlay) | 4547 if (inspectorPageOverlay) |
| 4536 inspectorPageOverlay->update(); | 4548 inspectorPageOverlay->update(); |
| 4537 } | 4549 } |
| 4538 } | 4550 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4572 { | 4584 { |
| 4573 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than | 4585 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than |
| 4574 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. | 4586 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. |
| 4575 if (!page()) | 4587 if (!page()) |
| 4576 return 1; | 4588 return 1; |
| 4577 | 4589 |
| 4578 return page()->deviceScaleFactor(); | 4590 return page()->deviceScaleFactor(); |
| 4579 } | 4591 } |
| 4580 | 4592 |
| 4581 } // namespace blink | 4593 } // namespace blink |
| OLD | NEW |