Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 1538803002: Migrates battery_status from content/renderer/ to WebKit/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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/KeyboardCodes.h" 103 #include "platform/KeyboardCodes.h"
103 #include "platform/Logging.h" 104 #include "platform/Logging.h"
104 #include "platform/NotImplemented.h" 105 #include "platform/NotImplemented.h"
(...skipping 4472 matching lines...) Expand 10 before | Expand all | Expand 10 after
4577 void WebViewImpl::forceNextWebGLContextCreationToFail() 4578 void WebViewImpl::forceNextWebGLContextCreationToFail()
4578 { 4579 {
4579 WebGLRenderingContext::forceNextWebGLContextCreationToFail(); 4580 WebGLRenderingContext::forceNextWebGLContextCreationToFail();
4580 } 4581 }
4581 4582
4582 void WebViewImpl::forceNextDrawingBufferCreationToFail() 4583 void WebViewImpl::forceNextDrawingBufferCreationToFail()
4583 { 4584 {
4584 DrawingBuffer::forceNextDrawingBufferCreationToFail(); 4585 DrawingBuffer::forceNextDrawingBufferCreationToFail();
4585 } 4586 }
4586 4587
4588 void WebViewImpl::updateBatteryStatusForTesting(bool charging, double chargingTi me, double dischargingTime, double level)
4589 {
4590 BatteryDispatcher::instance().onUpdateBatteryStatus(
4591 BatteryStatus(charging, chargingTime, dischargingTime, level));
4592 }
4593
4594 void WebViewImpl::resetBatteryStatusForTesting()
4595 {
4596 BatteryDispatcher::instance().onUpdateBatteryStatus(BatteryStatus());
4597 }
4598
4587 void WebViewImpl::updatePageOverlays() 4599 void WebViewImpl::updatePageOverlays()
4588 { 4600 {
4589 if (m_pageColorOverlay) 4601 if (m_pageColorOverlay)
4590 m_pageColorOverlay->update(); 4602 m_pageColorOverlay->update();
4591 if (InspectorOverlay* overlay = inspectorOverlay()) { 4603 if (InspectorOverlay* overlay = inspectorOverlay()) {
4592 PageOverlay* inspectorPageOverlay = overlay->pageOverlay(); 4604 PageOverlay* inspectorPageOverlay = overlay->pageOverlay();
4593 if (inspectorPageOverlay) 4605 if (inspectorPageOverlay)
4594 inspectorPageOverlay->update(); 4606 inspectorPageOverlay->update();
4595 } 4607 }
4596 } 4608 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
4630 { 4642 {
4631 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than 4643 // TODO(oshima): Investigate if this should return the ScreenInfo's scale fa ctor rather than
4632 // page's scale factor, which can be 1 in use-zoom-for-dsf mode. 4644 // page's scale factor, which can be 1 in use-zoom-for-dsf mode.
4633 if (!page()) 4645 if (!page())
4634 return 1; 4646 return 1;
4635 4647
4636 return page()->deviceScaleFactor(); 4648 return page()->deviceScaleFactor();
4637 } 4649 }
4638 4650
4639 } // namespace blink 4651 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698