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

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: Update compile-time assertion for matching enum 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 #include "core/page/PointerLockController.h" 117 #include "core/page/PointerLockController.h"
117 #include "core/page/TouchDisambiguation.h" 118 #include "core/page/TouchDisambiguation.h"
118 #include "core/rendering/RenderLayerCompositor.h" 119 #include "core/rendering/RenderLayerCompositor.h"
119 #include "core/rendering/RenderView.h" 120 #include "core/rendering/RenderView.h"
120 #include "core/rendering/RenderWidget.h" 121 #include "core/rendering/RenderWidget.h"
121 #include "core/rendering/TextAutosizer.h" 122 #include "core/rendering/TextAutosizer.h"
122 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" 123 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h"
123 #include "modules/geolocation/GeolocationController.h" 124 #include "modules/geolocation/GeolocationController.h"
124 #include "modules/indexeddb/InspectorIndexedDBAgent.h" 125 #include "modules/indexeddb/InspectorIndexedDBAgent.h"
125 #include "modules/notifications/NotificationController.h" 126 #include "modules/notifications/NotificationController.h"
127 #include "modules/screen_orientation/ScreenOrientationController.h"
126 #include "painting/ContinuousPainter.h" 128 #include "painting/ContinuousPainter.h"
127 #include "platform/ContextMenu.h" 129 #include "platform/ContextMenu.h"
128 #include "platform/ContextMenuItem.h" 130 #include "platform/ContextMenuItem.h"
129 #include "platform/Cursor.h" 131 #include "platform/Cursor.h"
130 #include "platform/KeyboardCodes.h" 132 #include "platform/KeyboardCodes.h"
131 #include "platform/NotImplemented.h" 133 #include "platform/NotImplemented.h"
132 #include "platform/OverscrollTheme.h" 134 #include "platform/OverscrollTheme.h"
133 #include "platform/PlatformGestureEvent.h" 135 #include "platform/PlatformGestureEvent.h"
134 #include "platform/PlatformKeyboardEvent.h" 136 #include "platform/PlatformKeyboardEvent.h"
135 #include "platform/PlatformMouseEvent.h" 137 #include "platform/PlatformMouseEvent.h"
(...skipping 224 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 22 matching lines...) Expand all
402 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get()); 405 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get());
403 provideNotification(m_page.get(), notificationPresenterImpl()); 406 provideNotification(m_page.get(), notificationPresenterImpl());
404 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et()); 407 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et());
405 408
406 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get()); 409 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get());
407 if (RuntimeEnabledFeatures::deviceOrientationEnabled()) 410 if (RuntimeEnabledFeatures::deviceOrientationEnabled())
408 DeviceOrientationInspectorAgent::provideTo(m_page.get()); 411 DeviceOrientationInspectorAgent::provideTo(m_page.get());
409 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get()); 412 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get());
410 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et())); 413 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et()));
411 414
415 provideScreenOrientation(m_page.get(), m_screenOrientationClientProxy.get()) ;
416 m_screenOrientationClientProxy->setController(ScreenOrientationController::f rom(m_page.get()));
417
412 provideLocalFileSystemTo(m_page.get(), LocalFileSystemClient::create()); 418 provideLocalFileSystemTo(m_page.get(), LocalFileSystemClient::create());
413 provideDatabaseClientTo(m_page.get(), DatabaseClientImpl::create()); 419 provideDatabaseClientTo(m_page.get(), DatabaseClientImpl::create());
414 InspectorIndexedDBAgent::provideTo(m_page.get()); 420 InspectorIndexedDBAgent::provideTo(m_page.get());
415 provideStorageQuotaClientTo(m_page.get(), StorageQuotaClientImpl::create()); 421 provideStorageQuotaClientTo(m_page.get(), StorageQuotaClientImpl::create());
416 m_validationMessage = ValidationMessageClientImpl::create(*this); 422 m_validationMessage = ValidationMessageClientImpl::create(*this);
417 m_page->setValidationMessageClient(m_validationMessage.get()); 423 m_page->setValidationMessageClient(m_validationMessage.get());
418 provideWorkerGlobalScopeProxyProviderTo(m_page.get(), WorkerGlobalScopeProxy ProviderImpl::create()); 424 provideWorkerGlobalScopeProxyProviderTo(m_page.get(), WorkerGlobalScopeProxy ProviderImpl::create());
419 425
420 m_page->setGroupType(Page::SharedPageGroup); 426 m_page->setGroupType(Page::SharedPageGroup);
421 427
(...skipping 3563 matching lines...) Expand 10 before | Expand all | Expand 10 after
3985 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3991 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3986 3992
3987 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3993 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3988 return false; 3994 return false;
3989 3995
3990 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3996 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3991 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 3997 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3992 } 3998 }
3993 3999
3994 } // namespace blink 4000 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698