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

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

Issue 319633007: Move WebScreenOrientationClient to WebFrameClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #include "core/page/TouchDisambiguation.h" 77 #include "core/page/TouchDisambiguation.h"
78 #include "core/rendering/FastTextAutosizer.h" 78 #include "core/rendering/FastTextAutosizer.h"
79 #include "core/rendering/RenderView.h" 79 #include "core/rendering/RenderView.h"
80 #include "core/rendering/RenderWidget.h" 80 #include "core/rendering/RenderWidget.h"
81 #include "core/rendering/TextAutosizer.h" 81 #include "core/rendering/TextAutosizer.h"
82 #include "core/rendering/compositing/RenderLayerCompositor.h" 82 #include "core/rendering/compositing/RenderLayerCompositor.h"
83 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h" 83 #include "modules/device_orientation/DeviceOrientationInspectorAgent.h"
84 #include "modules/encryptedmedia/MediaKeysController.h" 84 #include "modules/encryptedmedia/MediaKeysController.h"
85 #include "modules/indexeddb/InspectorIndexedDBAgent.h" 85 #include "modules/indexeddb/InspectorIndexedDBAgent.h"
86 #include "modules/push_messaging/PushController.h" 86 #include "modules/push_messaging/PushController.h"
87 #include "modules/screen_orientation/ScreenOrientationController.h"
88 #include "platform/ContextMenu.h" 87 #include "platform/ContextMenu.h"
89 #include "platform/ContextMenuItem.h" 88 #include "platform/ContextMenuItem.h"
90 #include "platform/Cursor.h" 89 #include "platform/Cursor.h"
91 #include "platform/KeyboardCodes.h" 90 #include "platform/KeyboardCodes.h"
92 #include "platform/NotImplemented.h" 91 #include "platform/NotImplemented.h"
93 #include "platform/OverscrollTheme.h" 92 #include "platform/OverscrollTheme.h"
94 #include "platform/PlatformGestureEvent.h" 93 #include "platform/PlatformGestureEvent.h"
95 #include "platform/PlatformKeyboardEvent.h" 94 #include "platform/PlatformKeyboardEvent.h"
96 #include "platform/PlatformMouseEvent.h" 95 #include "platform/PlatformMouseEvent.h"
97 #include "platform/PlatformWheelEvent.h" 96 #include "platform/PlatformWheelEvent.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 provideStorageQuotaClientTo(*m_page, StorageQuotaClientImpl::create()); 422 provideStorageQuotaClientTo(*m_page, StorageQuotaClientImpl::create());
424 m_page->setValidationMessageClient(ValidationMessageClientImpl::create(*this )); 423 m_page->setValidationMessageClient(ValidationMessageClientImpl::create(*this ));
425 provideWorkerGlobalScopeProxyProviderTo(*m_page, WorkerGlobalScopeProxyProvi derImpl::create()); 424 provideWorkerGlobalScopeProxyProviderTo(*m_page, WorkerGlobalScopeProxyProvi derImpl::create());
426 425
427 m_page->makeOrdinary(); 426 m_page->makeOrdinary();
428 427
429 if (m_client) { 428 if (m_client) {
430 providePushControllerTo(*m_page, m_client->webPushClient()); 429 providePushControllerTo(*m_page, m_client->webPushClient());
431 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor); 430 setDeviceScaleFactor(m_client->screenInfo().deviceScaleFactor);
432 setVisibilityState(m_client->visibilityState(), true); 431 setVisibilityState(m_client->visibilityState(), true);
433 if (RuntimeEnabledFeatures::screenOrientationEnabled())
434 ScreenOrientationController::provideTo(*m_page, m_client->webScreenO rientationClient());
435 } 432 }
436 433
437 m_inspectorSettingsMap = adoptPtr(new SettingsMap); 434 m_inspectorSettingsMap = adoptPtr(new SettingsMap);
438 } 435 }
439 436
440 WebViewImpl::~WebViewImpl() 437 WebViewImpl::~WebViewImpl()
441 { 438 {
442 ASSERT(!m_page); 439 ASSERT(!m_page);
443 } 440 }
444 441
(...skipping 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after
4101 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4098 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4102 4099
4103 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4100 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4104 return false; 4101 return false;
4105 4102
4106 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4103 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4107 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4104 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4108 } 4105 }
4109 4106
4110 } // namespace blink 4107 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698