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

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

Issue 132113006: Add initial Blink-side support for the Screen Orientation API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add locked-no-orientation-change-event.html layout test Created 6 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 | Annotate | Revision Log
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 28 matching lines...) Expand all
39 #include "GeolocationClientProxy.h" 39 #include "GeolocationClientProxy.h"
40 #include "GraphicsLayerFactoryChromium.h" 40 #include "GraphicsLayerFactoryChromium.h"
41 #include "HTMLNames.h" 41 #include "HTMLNames.h"
42 #include "LinkHighlight.h" 42 #include "LinkHighlight.h"
43 #include "LocalFileSystemClient.h" 43 #include "LocalFileSystemClient.h"
44 #include "MIDIClientProxy.h" 44 #include "MIDIClientProxy.h"
45 #include "PinchViewports.h" 45 #include "PinchViewports.h"
46 #include "PopupContainer.h" 46 #include "PopupContainer.h"
47 #include "PrerendererClientImpl.h" 47 #include "PrerendererClientImpl.h"
48 #include "RuntimeEnabledFeatures.h" 48 #include "RuntimeEnabledFeatures.h"
49 #include "ScreenOrientationClientProxy.h"
49 #include "SpeechInputClientImpl.h" 50 #include "SpeechInputClientImpl.h"
50 #include "SpeechRecognitionClientProxy.h" 51 #include "SpeechRecognitionClientProxy.h"
51 #include "StorageQuotaClientImpl.h" 52 #include "StorageQuotaClientImpl.h"
52 #include "ValidationMessageClientImpl.h" 53 #include "ValidationMessageClientImpl.h"
53 #include "ViewportAnchor.h" 54 #include "ViewportAnchor.h"
54 #include "WebAXObject.h" 55 #include "WebAXObject.h"
55 #include "WebActiveWheelFlingParameters.h" 56 #include "WebActiveWheelFlingParameters.h"
56 #include "WebAutofillClient.h" 57 #include "WebAutofillClient.h"
57 #include "WebDevToolsAgentImpl.h" 58 #include "WebDevToolsAgentImpl.h"
58 #include "WebDevToolsAgentPrivate.h" 59 #include "WebDevToolsAgentPrivate.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 #include "core/page/PointerLockController.h" 118 #include "core/page/PointerLockController.h"
118 #include "core/page/TouchDisambiguation.h" 119 #include "core/page/TouchDisambiguation.h"
119 #include "core/rendering/RenderLayerCompositor.h" 120 #include "core/rendering/RenderLayerCompositor.h"
120 #include "core/rendering/RenderView.h" 121 #include "core/rendering/RenderView.h"
121 #include "core/rendering/RenderWidget.h" 122 #include "core/rendering/RenderWidget.h"
122 #include "core/rendering/TextAutosizer.h" 123 #include "core/rendering/TextAutosizer.h"
123 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" 124 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h"
124 #include "modules/geolocation/GeolocationController.h" 125 #include "modules/geolocation/GeolocationController.h"
125 #include "modules/indexeddb/InspectorIndexedDBAgent.h" 126 #include "modules/indexeddb/InspectorIndexedDBAgent.h"
126 #include "modules/notifications/NotificationController.h" 127 #include "modules/notifications/NotificationController.h"
128 #include "modules/screen_orientation/ScreenOrientationController.h"
127 #include "painting/ContinuousPainter.h" 129 #include "painting/ContinuousPainter.h"
128 #include "platform/ContextMenu.h" 130 #include "platform/ContextMenu.h"
129 #include "platform/ContextMenuItem.h" 131 #include "platform/ContextMenuItem.h"
130 #include "platform/Cursor.h" 132 #include "platform/Cursor.h"
131 #include "platform/KeyboardCodes.h" 133 #include "platform/KeyboardCodes.h"
132 #include "platform/NotImplemented.h" 134 #include "platform/NotImplemented.h"
133 #include "platform/OverscrollTheme.h" 135 #include "platform/OverscrollTheme.h"
134 #include "platform/PlatformGestureEvent.h" 136 #include "platform/PlatformGestureEvent.h"
135 #include "platform/PlatformKeyboardEvent.h" 137 #include "platform/PlatformKeyboardEvent.h"
136 #include "platform/PlatformMouseEvent.h" 138 #include "platform/PlatformMouseEvent.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this))) 362 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this)))
361 , m_isAcceleratedCompositingActive(false) 363 , m_isAcceleratedCompositingActive(false)
362 , m_layerTreeViewCommitsDeferred(false) 364 , m_layerTreeViewCommitsDeferred(false)
363 , m_compositorCreationFailed(false) 365 , m_compositorCreationFailed(false)
364 , m_recreatingGraphicsContext(false) 366 , m_recreatingGraphicsContext(false)
365 #if ENABLE(INPUT_SPEECH) 367 #if ENABLE(INPUT_SPEECH)
366 , m_speechInputClient(SpeechInputClientImpl::create(client)) 368 , m_speechInputClient(SpeechInputClientImpl::create(client))
367 #endif 369 #endif
368 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0)) 370 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0))
369 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0))) 371 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0)))
372 , m_screenOrientationClientProxy(ScreenOrientationClientProxy::create(client ? client->screenOrientationClient() : 0))
370 , m_userMediaClientImpl(this) 373 , m_userMediaClientImpl(this)
371 , m_midiClientProxy(adoptPtr(new MIDIClientProxy(client ? client->webMIDICli ent() : 0))) 374 , m_midiClientProxy(adoptPtr(new MIDIClientProxy(client ? client->webMIDICli ent() : 0)))
372 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this )) 375 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this ))
373 , m_flingModifier(0) 376 , m_flingModifier(0)
374 , m_flingSourceDevice(false) 377 , m_flingSourceDevice(false)
375 , m_fullscreenController(FullscreenController::create(this)) 378 , m_fullscreenController(FullscreenController::create(this))
376 , m_showFPSCounter(false) 379 , m_showFPSCounter(false)
377 , m_showPaintRects(false) 380 , m_showPaintRects(false)
378 , m_showDebugBorders(false) 381 , m_showDebugBorders(false)
379 , m_continuousPaintingEnabled(false) 382 , m_continuousPaintingEnabled(false)
(...skipping 21 matching lines...) Expand all
401 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get()); 404 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get());
402 provideNotification(m_page.get(), notificationPresenterImpl()); 405 provideNotification(m_page.get(), notificationPresenterImpl());
403 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et()); 406 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et());
404 407
405 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get()); 408 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get());
406 if (RuntimeEnabledFeatures::deviceOrientationEnabled()) 409 if (RuntimeEnabledFeatures::deviceOrientationEnabled())
407 DeviceOrientationInspectorAgent::provideTo(m_page.get()); 410 DeviceOrientationInspectorAgent::provideTo(m_page.get());
408 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get()); 411 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get());
409 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et())); 412 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et()));
410 413
414 provideScreenOrientation(m_page.get(), m_screenOrientationClientProxy.get()) ;
415 m_screenOrientationClientProxy->setController(ScreenOrientationController::f rom(m_page.get()));
416
411 provideLocalFileSystemTo(m_page.get(), LocalFileSystemClient::create()); 417 provideLocalFileSystemTo(m_page.get(), LocalFileSystemClient::create());
412 provideDatabaseClientTo(m_page.get(), DatabaseClientImpl::create()); 418 provideDatabaseClientTo(m_page.get(), DatabaseClientImpl::create());
413 InspectorIndexedDBAgent::provideTo(m_page.get()); 419 InspectorIndexedDBAgent::provideTo(m_page.get());
414 provideStorageQuotaClientTo(m_page.get(), StorageQuotaClientImpl::create()); 420 provideStorageQuotaClientTo(m_page.get(), StorageQuotaClientImpl::create());
415 m_validationMessage = ValidationMessageClientImpl::create(*this); 421 m_validationMessage = ValidationMessageClientImpl::create(*this);
416 m_page->setValidationMessageClient(m_validationMessage.get()); 422 m_page->setValidationMessageClient(m_validationMessage.get());
417 provideWorkerGlobalScopeProxyProviderTo(m_page.get(), WorkerGlobalScopeProxy ProviderImpl::create()); 423 provideWorkerGlobalScopeProxyProviderTo(m_page.get(), WorkerGlobalScopeProxy ProviderImpl::create());
418 424
419 m_page->setGroupType(Page::SharedPageGroup); 425 m_page->setGroupType(Page::SharedPageGroup);
420 426
(...skipping 3567 matching lines...) Expand 10 before | Expand all | Expand 10 after
3988 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3994 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3989 3995
3990 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3996 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3991 return false; 3997 return false;
3992 3998
3993 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3999 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3994 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4000 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3995 } 4001 }
3996 4002
3997 } // namespace blink 4003 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698