| 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 30 matching lines...) Expand all Loading... |
| 41 #include "public/platform/WebPoint.h" | 41 #include "public/platform/WebPoint.h" |
| 42 #include "public/platform/WebRect.h" | 42 #include "public/platform/WebRect.h" |
| 43 #include "public/platform/WebString.h" | 43 #include "public/platform/WebString.h" |
| 44 #include "public/platform/WebVector.h" | 44 #include "public/platform/WebVector.h" |
| 45 #include <wtf/CurrentTime.h> | 45 #include <wtf/CurrentTime.h> |
| 46 #include <wtf/MainThread.h> | 46 #include <wtf/MainThread.h> |
| 47 #include <wtf/RefPtr.h> | 47 #include <wtf/RefPtr.h> |
| 48 #include <wtf/TemporaryChange.h> | 48 #include <wtf/TemporaryChange.h> |
| 49 #include <wtf/Uint8ClampedArray.h> | 49 #include <wtf/Uint8ClampedArray.h> |
| 50 #include "AutofillPopupMenuClient.h" | 50 #include "AutofillPopupMenuClient.h" |
| 51 #include "BatteryClientImpl.h" | |
| 52 #include "CSSValueKeywords.h" | 51 #include "CSSValueKeywords.h" |
| 53 #include "CompositionUnderlineVectorBuilder.h" | 52 #include "CompositionUnderlineVectorBuilder.h" |
| 54 #include "ContextFeaturesClientImpl.h" | 53 #include "ContextFeaturesClientImpl.h" |
| 55 #include "DeviceOrientationClientProxy.h" | 54 #include "DeviceOrientationClientProxy.h" |
| 56 #include "GeolocationClientProxy.h" | 55 #include "GeolocationClientProxy.h" |
| 57 #include "GraphicsLayerFactoryChromium.h" | 56 #include "GraphicsLayerFactoryChromium.h" |
| 58 #include "HTMLNames.h" | 57 #include "HTMLNames.h" |
| 59 #include "LinkHighlight.h" | 58 #include "LinkHighlight.h" |
| 60 #include "PageWidgetDelegate.h" | 59 #include "PageWidgetDelegate.h" |
| 61 #include "PopupContainer.h" | 60 #include "PopupContainer.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 #include "core/platform/graphics/GraphicsContext3D.h" | 144 #include "core/platform/graphics/GraphicsContext3D.h" |
| 146 #include "core/platform/graphics/Image.h" | 145 #include "core/platform/graphics/Image.h" |
| 147 #include "core/platform/graphics/ImageBuffer.h" | 146 #include "core/platform/graphics/ImageBuffer.h" |
| 148 #include "core/platform/graphics/chromium/LayerPainterChromium.h" | 147 #include "core/platform/graphics/chromium/LayerPainterChromium.h" |
| 149 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h" | 148 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h" |
| 150 #include "core/platform/network/ResourceHandle.h" | 149 #include "core/platform/network/ResourceHandle.h" |
| 151 #include "core/rendering/RenderLayerCompositor.h" | 150 #include "core/rendering/RenderLayerCompositor.h" |
| 152 #include "core/rendering/RenderView.h" | 151 #include "core/rendering/RenderView.h" |
| 153 #include "core/rendering/RenderWidget.h" | 152 #include "core/rendering/RenderWidget.h" |
| 154 #include "core/rendering/TextAutosizer.h" | 153 #include "core/rendering/TextAutosizer.h" |
| 155 #include "modules/battery/BatteryController.h" | |
| 156 #include "modules/geolocation/GeolocationController.h" | 154 #include "modules/geolocation/GeolocationController.h" |
| 157 #include "weborigin/SchemeRegistry.h" | 155 #include "weborigin/SchemeRegistry.h" |
| 158 #include "weborigin/SecurityOrigin.h" | 156 #include "weborigin/SecurityOrigin.h" |
| 159 #include "weborigin/SecurityPolicy.h" | 157 #include "weborigin/SecurityPolicy.h" |
| 160 #include "painting/ContinuousPainter.h" | 158 #include "painting/ContinuousPainter.h" |
| 161 | 159 |
| 162 #if ENABLE(DEFAULT_RENDER_THEME) | 160 #if ENABLE(DEFAULT_RENDER_THEME) |
| 163 #include "core/platform/chromium/PlatformThemeChromiumDefault.h" | 161 #include "core/platform/chromium/PlatformThemeChromiumDefault.h" |
| 164 #include "core/rendering/RenderThemeChromiumDefault.h" | 162 #include "core/rendering/RenderThemeChromiumDefault.h" |
| 165 #endif | 163 #endif |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 , m_isAcceleratedCompositingActive(false) | 411 , m_isAcceleratedCompositingActive(false) |
| 414 , m_layerTreeViewCommitsDeferred(false) | 412 , m_layerTreeViewCommitsDeferred(false) |
| 415 , m_compositorCreationFailed(false) | 413 , m_compositorCreationFailed(false) |
| 416 , m_recreatingGraphicsContext(false) | 414 , m_recreatingGraphicsContext(false) |
| 417 #if ENABLE(INPUT_SPEECH) | 415 #if ENABLE(INPUT_SPEECH) |
| 418 , m_speechInputClient(SpeechInputClientImpl::create(client)) | 416 , m_speechInputClient(SpeechInputClientImpl::create(client)) |
| 419 #endif | 417 #endif |
| 420 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl
ient->speechRecognizer() : 0)) | 418 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl
ient->speechRecognizer() : 0)) |
| 421 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c
lient ? client->deviceOrientationClient() : 0))) | 419 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c
lient ? client->deviceOrientationClient() : 0))) |
| 422 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie
nt->geolocationClient() : 0))) | 420 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie
nt->geolocationClient() : 0))) |
| 423 #if ENABLE(BATTERY_STATUS) | |
| 424 , m_batteryClient(adoptPtr(new BatteryClientImpl(client ? client->batterySta
tusClient() : 0))) | |
| 425 #endif | |
| 426 , m_emulatedTextZoomFactor(1) | 421 , m_emulatedTextZoomFactor(1) |
| 427 , m_userMediaClientImpl(this) | 422 , m_userMediaClientImpl(this) |
| 428 #if ENABLE(NAVIGATOR_CONTENT_UTILS) | 423 #if ENABLE(NAVIGATOR_CONTENT_UTILS) |
| 429 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this
)) | 424 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this
)) |
| 430 #endif | 425 #endif |
| 431 , m_flingModifier(0) | 426 , m_flingModifier(0) |
| 432 , m_flingSourceDevice(false) | 427 , m_flingSourceDevice(false) |
| 433 , m_showFPSCounter(false) | 428 , m_showFPSCounter(false) |
| 434 , m_showPaintRects(false) | 429 , m_showPaintRects(false) |
| 435 , m_showDebugBorders(false) | 430 , m_showDebugBorders(false) |
| (...skipping 18 matching lines...) Expand all Loading... |
| 454 #endif | 449 #endif |
| 455 #if ENABLE(NAVIGATOR_CONTENT_UTILS) | 450 #if ENABLE(NAVIGATOR_CONTENT_UTILS) |
| 456 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g
et()); | 451 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g
et()); |
| 457 #endif | 452 #endif |
| 458 | 453 |
| 459 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get()); | 454 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get()); |
| 460 provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get(
)); | 455 provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get(
)); |
| 461 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get()); | 456 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get()); |
| 462 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g
et())); | 457 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g
et())); |
| 463 | 458 |
| 464 #if ENABLE(BATTERY_STATUS) | |
| 465 provideBatteryTo(m_page.get(), m_batteryClient.get()); | |
| 466 m_batteryClient->setController(BatteryController::from(m_page.get())); | |
| 467 #endif | |
| 468 | |
| 469 m_page->setGroupType(Page::SharedPageGroup); | 459 m_page->setGroupType(Page::SharedPageGroup); |
| 470 | 460 |
| 471 unsigned layoutMilestones = DidFirstLayout | DidFirstVisuallyNonEmptyLayout; | 461 unsigned layoutMilestones = DidFirstLayout | DidFirstVisuallyNonEmptyLayout; |
| 472 m_page->addLayoutMilestones(static_cast<LayoutMilestones>(layoutMilestones))
; | 462 m_page->addLayoutMilestones(static_cast<LayoutMilestones>(layoutMilestones))
; |
| 473 | 463 |
| 474 if (m_client) { | 464 if (m_client) { |
| 475 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor); | 465 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor); |
| 476 setVisibilityState(m_client->visibilityState(), true); | 466 setVisibilityState(m_client->visibilityState(), true); |
| 477 } | 467 } |
| 478 | 468 |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 return; | 1699 return; |
| 1710 | 1700 |
| 1711 if (Document* doc = m_fullScreenFrame->document()) { | 1701 if (Document* doc = m_fullScreenFrame->document()) { |
| 1712 if (doc->webkitIsFullScreen()) | 1702 if (doc->webkitIsFullScreen()) |
| 1713 doc->webkitDidExitFullScreenForElement(0); | 1703 doc->webkitDidExitFullScreenForElement(0); |
| 1714 } | 1704 } |
| 1715 | 1705 |
| 1716 m_fullScreenFrame.clear(); | 1706 m_fullScreenFrame.clear(); |
| 1717 } | 1707 } |
| 1718 | 1708 |
| 1719 #if ENABLE(BATTERY_STATUS) | |
| 1720 void WebViewImpl::updateBatteryStatus(const WebBatteryStatus& status) | |
| 1721 { | |
| 1722 m_batteryClient->updateBatteryStatus(status); | |
| 1723 } | |
| 1724 #endif | |
| 1725 | |
| 1726 void WebViewImpl::animate(double monotonicFrameBeginTime) | 1709 void WebViewImpl::animate(double monotonicFrameBeginTime) |
| 1727 { | 1710 { |
| 1728 TRACE_EVENT0("webkit", "WebViewImpl::animate"); | 1711 TRACE_EVENT0("webkit", "WebViewImpl::animate"); |
| 1729 | 1712 |
| 1730 if (!monotonicFrameBeginTime) | 1713 if (!monotonicFrameBeginTime) |
| 1731 monotonicFrameBeginTime = monotonicallyIncreasingTime(); | 1714 monotonicFrameBeginTime = monotonicallyIncreasingTime(); |
| 1732 | 1715 |
| 1733 // Create synthetic wheel events as necessary for fling. | 1716 // Create synthetic wheel events as necessary for fling. |
| 1734 if (m_gestureAnimation) { | 1717 if (m_gestureAnimation) { |
| 1735 if (m_gestureAnimation->animate(monotonicFrameBeginTime)) | 1718 if (m_gestureAnimation->animate(monotonicFrameBeginTime)) |
| (...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4100 } | 4083 } |
| 4101 | 4084 |
| 4102 bool WebViewImpl::shouldDisableDesktopWorkarounds() | 4085 bool WebViewImpl::shouldDisableDesktopWorkarounds() |
| 4103 { | 4086 { |
| 4104 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); | 4087 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport
Arguments(); |
| 4105 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom | 4088 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments.
userZoom |
| 4106 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); | 4089 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp
ortArguments::ValueAuto); |
| 4107 } | 4090 } |
| 4108 | 4091 |
| 4109 } // namespace WebKit | 4092 } // namespace WebKit |
| OLD | NEW |