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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 14460010: Implement the Blink part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixed comments and removed reduntant core/platform layer classes Created 7 years, 7 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 #include "core/platform/graphics/GraphicsContext.h" 135 #include "core/platform/graphics/GraphicsContext.h"
136 #include "core/platform/graphics/GraphicsContext3D.h" 136 #include "core/platform/graphics/GraphicsContext3D.h"
137 #include "core/platform/graphics/Image.h" 137 #include "core/platform/graphics/Image.h"
138 #include "core/platform/graphics/ImageBuffer.h" 138 #include "core/platform/graphics/ImageBuffer.h"
139 #include "core/platform/graphics/chromium/LayerPainterChromium.h" 139 #include "core/platform/graphics/chromium/LayerPainterChromium.h"
140 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h" 140 #include "core/platform/graphics/gpu/SharedGraphicsContext3D.h"
141 #include "core/platform/network/ResourceHandle.h" 141 #include "core/platform/network/ResourceHandle.h"
142 #include "core/rendering/RenderLayerCompositor.h" 142 #include "core/rendering/RenderLayerCompositor.h"
143 #include "core/rendering/RenderView.h" 143 #include "core/rendering/RenderView.h"
144 #include "core/rendering/RenderWidget.h" 144 #include "core/rendering/RenderWidget.h"
145 #include "modules/device_orientation/DeviceMotionController.h"
145 #include "painting/ContinuousPainter.h" 146 #include "painting/ContinuousPainter.h"
146 #include "painting/GraphicsContextBuilder.h" 147 #include "painting/GraphicsContextBuilder.h"
147 #include "src/WebActiveGestureAnimation.h" 148 #include "src/WebActiveGestureAnimation.h"
148 #include <public/Platform.h> 149 #include <public/Platform.h>
149 #include <public/WebCompositorOutputSurface.h> 150 #include <public/WebCompositorOutputSurface.h>
150 #include <public/WebCompositorSupport.h> 151 #include <public/WebCompositorSupport.h>
151 #include <public/WebDragData.h> 152 #include <public/WebDragData.h>
152 #include <public/WebFloatPoint.h> 153 #include <public/WebFloatPoint.h>
153 #include <public/WebGraphicsContext3D.h> 154 #include <public/WebGraphicsContext3D.h>
154 #include <public/WebImage.h> 155 #include <public/WebImage.h>
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 #endif 475 #endif
475 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get()); 476 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get());
476 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) 477 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
477 provideNotification(m_page.get(), notificationPresenterImpl()); 478 provideNotification(m_page.get(), notificationPresenterImpl());
478 #endif 479 #endif
479 #if ENABLE(NAVIGATOR_CONTENT_UTILS) 480 #if ENABLE(NAVIGATOR_CONTENT_UTILS)
480 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et()); 481 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et());
481 #endif 482 #endif
482 483
483 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get()); 484 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get());
485 provideDeviceMotionTo(m_page.get());
484 provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get( )); 486 provideDeviceOrientationTo(m_page.get(), m_deviceOrientationClientProxy.get( ));
485 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get()); 487 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get());
486 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et())); 488 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et()));
487 489
488 #if ENABLE(BATTERY_STATUS) 490 #if ENABLE(BATTERY_STATUS)
489 provideBatteryTo(m_page.get(), m_batteryClient.get()); 491 provideBatteryTo(m_page.get(), m_batteryClient.get());
490 m_batteryClient->setController(BatteryController::from(m_page.get())); 492 m_batteryClient->setController(BatteryController::from(m_page.get()));
491 #endif 493 #endif
492 494
493 m_page->setGroupType(Page::SharedPageGroup); 495 m_page->setGroupType(Page::SharedPageGroup);
(...skipping 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after
4213 } 4215 }
4214 4216
4215 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4217 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4216 { 4218 {
4217 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4219 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4218 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4220 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4219 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4221 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4220 } 4222 }
4221 4223
4222 } // namespace WebKit 4224 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698