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

Side by Side Diff: Source/web/WebLocalFrameImpl.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #include "core/rendering/RenderBox.h" 128 #include "core/rendering/RenderBox.h"
129 #include "core/rendering/RenderFrame.h" 129 #include "core/rendering/RenderFrame.h"
130 #include "core/rendering/RenderLayer.h" 130 #include "core/rendering/RenderLayer.h"
131 #include "core/rendering/RenderObject.h" 131 #include "core/rendering/RenderObject.h"
132 #include "core/rendering/RenderTreeAsText.h" 132 #include "core/rendering/RenderTreeAsText.h"
133 #include "core/rendering/RenderView.h" 133 #include "core/rendering/RenderView.h"
134 #include "core/rendering/style/StyleInheritedData.h" 134 #include "core/rendering/style/StyleInheritedData.h"
135 #include "core/timing/Performance.h" 135 #include "core/timing/Performance.h"
136 #include "modules/geolocation/GeolocationController.h" 136 #include "modules/geolocation/GeolocationController.h"
137 #include "modules/notifications/NotificationController.h" 137 #include "modules/notifications/NotificationController.h"
138 #include "modules/screen_orientation/ScreenOrientationController.h"
138 #include "platform/TraceEvent.h" 139 #include "platform/TraceEvent.h"
139 #include "platform/UserGestureIndicator.h" 140 #include "platform/UserGestureIndicator.h"
140 #include "platform/clipboard/ClipboardUtilities.h" 141 #include "platform/clipboard/ClipboardUtilities.h"
141 #include "platform/fonts/FontCache.h" 142 #include "platform/fonts/FontCache.h"
142 #include "platform/graphics/GraphicsContext.h" 143 #include "platform/graphics/GraphicsContext.h"
143 #include "platform/graphics/GraphicsLayerClient.h" 144 #include "platform/graphics/GraphicsLayerClient.h"
144 #include "platform/graphics/skia/SkiaUtils.h" 145 #include "platform/graphics/skia/SkiaUtils.h"
145 #include "platform/heap/Handle.h" 146 #include "platform/heap/Handle.h"
146 #include "platform/network/ResourceRequest.h" 147 #include "platform/network/ResourceRequest.h"
147 #include "platform/scroll/ScrollTypes.h" 148 #include "platform/scroll/ScrollTypes.h"
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used. 1612 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used.
1612 if (m_frame) { 1613 if (m_frame) {
1613 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N otificationPresenterImpl()); 1614 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N otificationPresenterImpl());
1614 if (m_client) 1615 if (m_client)
1615 notificationPresenter->initialize(m_client->notificationPresenter()) ; 1616 notificationPresenter->initialize(m_client->notificationPresenter()) ;
1616 1617
1617 provideNotification(*m_frame, notificationPresenter.release()); 1618 provideNotification(*m_frame, notificationPresenter.release());
1618 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1619 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1619 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); 1620 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1620 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get())); 1621 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get()));
1622 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1623 ScreenOrientationController::provideTo(*m_frame, m_client->webScreen OrientationClient());
1621 } 1624 }
1622 } 1625 }
1623 1626
1624 void WebLocalFrameImpl::initializeAsMainFrame(WebCore::Page* page) 1627 void WebLocalFrameImpl::initializeAsMainFrame(WebCore::Page* page)
1625 { 1628 {
1626 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, &page->frameHos t(), 0)); 1629 setWebCoreFrame(LocalFrame::create(&m_frameLoaderClientImpl, &page->frameHos t(), 0));
1627 1630
1628 // We must call init() after m_frame is assigned because it is referenced 1631 // We must call init() after m_frame is assigned because it is referenced
1629 // during init(). 1632 // during init().
1630 m_frame->init(); 1633 m_frame->init();
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 1923
1921 void WebLocalFrameImpl::invalidateAll() const 1924 void WebLocalFrameImpl::invalidateAll() const
1922 { 1925 {
1923 ASSERT(frame() && frame()->view()); 1926 ASSERT(frame() && frame()->view());
1924 FrameView* view = frame()->view(); 1927 FrameView* view = frame()->view();
1925 view->invalidateRect(view->frameRect()); 1928 view->invalidateRect(view->frameRect());
1926 invalidateScrollbar(); 1929 invalidateScrollbar();
1927 } 1930 }
1928 1931
1929 } // namespace blink 1932 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698