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

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: 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 #include "core/page/PageGroupLoadDeferrer.h" 115 #include "core/page/PageGroupLoadDeferrer.h"
115 #include "core/page/PagePopupClient.h" 116 #include "core/page/PagePopupClient.h"
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/geolocation/GeolocationController.h" 123 #include "modules/geolocation/GeolocationController.h"
123 #include "modules/notifications/NotificationController.h" 124 #include "modules/notifications/NotificationController.h"
125 #include "modules/screen_orientation/ScreenOrientationController.h"
124 #include "painting/ContinuousPainter.h" 126 #include "painting/ContinuousPainter.h"
125 #include "platform/ContextMenu.h" 127 #include "platform/ContextMenu.h"
126 #include "platform/ContextMenuItem.h" 128 #include "platform/ContextMenuItem.h"
127 #include "platform/Cursor.h" 129 #include "platform/Cursor.h"
128 #include "platform/KeyboardCodes.h" 130 #include "platform/KeyboardCodes.h"
129 #include "platform/NotImplemented.h" 131 #include "platform/NotImplemented.h"
130 #include "platform/OverscrollTheme.h" 132 #include "platform/OverscrollTheme.h"
131 #include "platform/PlatformGestureEvent.h" 133 #include "platform/PlatformGestureEvent.h"
132 #include "platform/PlatformKeyboardEvent.h" 134 #include "platform/PlatformKeyboardEvent.h"
133 #include "platform/PlatformMouseEvent.h" 135 #include "platform/PlatformMouseEvent.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this))) 359 , m_graphicsLayerFactory(adoptPtr(new GraphicsLayerFactoryChromium(this)))
358 , m_isAcceleratedCompositingActive(false) 360 , m_isAcceleratedCompositingActive(false)
359 , m_layerTreeViewCommitsDeferred(false) 361 , m_layerTreeViewCommitsDeferred(false)
360 , m_compositorCreationFailed(false) 362 , m_compositorCreationFailed(false)
361 , m_recreatingGraphicsContext(false) 363 , m_recreatingGraphicsContext(false)
362 #if ENABLE(INPUT_SPEECH) 364 #if ENABLE(INPUT_SPEECH)
363 , m_speechInputClient(SpeechInputClientImpl::create(client)) 365 , m_speechInputClient(SpeechInputClientImpl::create(client))
364 #endif 366 #endif
365 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0)) 367 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0))
366 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0))) 368 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0)))
369 , m_screenOrientationClientProxy(ScreenOrientationClientProxy::create(client ? client->screenOrientationClient() : 0))
367 , m_userMediaClientImpl(this) 370 , m_userMediaClientImpl(this)
368 , m_midiClientProxy(adoptPtr(new MIDIClientProxy(client ? client->webMIDICli ent() : 0))) 371 , m_midiClientProxy(adoptPtr(new MIDIClientProxy(client ? client->webMIDICli ent() : 0)))
369 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this )) 372 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this ))
370 , m_flingModifier(0) 373 , m_flingModifier(0)
371 , m_flingSourceDevice(false) 374 , m_flingSourceDevice(false)
372 , m_fullscreenController(FullscreenController::create(this)) 375 , m_fullscreenController(FullscreenController::create(this))
373 , m_showFPSCounter(false) 376 , m_showFPSCounter(false)
374 , m_showPaintRects(false) 377 , m_showPaintRects(false)
375 , m_showDebugBorders(false) 378 , m_showDebugBorders(false)
376 , m_continuousPaintingEnabled(false) 379 , m_continuousPaintingEnabled(false)
(...skipping 19 matching lines...) Expand all
396 provideSpeechInputTo(m_page.get(), m_speechInputClient.get()); 399 provideSpeechInputTo(m_page.get(), m_speechInputClient.get());
397 #endif 400 #endif
398 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get()); 401 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get());
399 provideNotification(m_page.get(), notificationPresenterImpl()); 402 provideNotification(m_page.get(), notificationPresenterImpl());
400 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et()); 403 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et());
401 404
402 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get()); 405 provideContextFeaturesTo(m_page.get(), m_featureSwitchClient.get());
403 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get()); 406 provideGeolocationTo(m_page.get(), m_geolocationClientProxy.get());
404 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et())); 407 m_geolocationClientProxy->setController(GeolocationController::from(m_page.g et()));
405 408
409 provideScreenOrientation(m_page.get(), m_screenOrientationClientProxy.get()) ;
410 m_screenOrientationClientProxy->setController(ScreenOrientationController::f rom(m_page.get()));
411
406 provideLocalFileSystemTo(m_page.get(), LocalFileSystemClient::create()); 412 provideLocalFileSystemTo(m_page.get(), LocalFileSystemClient::create());
407 provideDatabaseClientTo(m_page.get(), DatabaseClientImpl::create()); 413 provideDatabaseClientTo(m_page.get(), DatabaseClientImpl::create());
408 provideStorageQuotaClientTo(m_page.get(), StorageQuotaClientImpl::create()); 414 provideStorageQuotaClientTo(m_page.get(), StorageQuotaClientImpl::create());
409 m_validationMessage = ValidationMessageClientImpl::create(*this); 415 m_validationMessage = ValidationMessageClientImpl::create(*this);
410 m_page->setValidationMessageClient(m_validationMessage.get()); 416 m_page->setValidationMessageClient(m_validationMessage.get());
411 provideWorkerGlobalScopeProxyProviderTo(m_page.get(), WorkerGlobalScopeProxy ProviderImpl::create()); 417 provideWorkerGlobalScopeProxyProviderTo(m_page.get(), WorkerGlobalScopeProxy ProviderImpl::create());
412 418
413 m_page->setGroupType(Page::SharedPageGroup); 419 m_page->setGroupType(Page::SharedPageGroup);
414 420
415 if (m_client) { 421 if (m_client) {
(...skipping 3565 matching lines...) Expand 10 before | Expand all | Expand 10 after
3981 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3987 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3982 3988
3983 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3989 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3984 return false; 3990 return false;
3985 3991
3986 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3992 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3987 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 3993 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3988 } 3994 }
3989 3995
3990 } // namespace blink 3996 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698