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

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

Issue 624033003: [WIP] Move Web Notifications to a WebFrame-less code path (Blink). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: current state Created 6 years, 2 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
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebNotification.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 #include "core/rendering/HitTestResult.h" 142 #include "core/rendering/HitTestResult.h"
143 #include "core/rendering/RenderBox.h" 143 #include "core/rendering/RenderBox.h"
144 #include "core/rendering/RenderFrame.h" 144 #include "core/rendering/RenderFrame.h"
145 #include "core/rendering/RenderLayer.h" 145 #include "core/rendering/RenderLayer.h"
146 #include "core/rendering/RenderObject.h" 146 #include "core/rendering/RenderObject.h"
147 #include "core/rendering/RenderTreeAsText.h" 147 #include "core/rendering/RenderTreeAsText.h"
148 #include "core/rendering/RenderView.h" 148 #include "core/rendering/RenderView.h"
149 #include "core/rendering/style/StyleInheritedData.h" 149 #include "core/rendering/style/StyleInheritedData.h"
150 #include "core/timing/Performance.h" 150 #include "core/timing/Performance.h"
151 #include "modules/geolocation/GeolocationController.h" 151 #include "modules/geolocation/GeolocationController.h"
152 #include "modules/notifications/NotificationController.h"
153 #include "modules/notifications/NotificationPermissionClient.h" 152 #include "modules/notifications/NotificationPermissionClient.h"
154 #include "modules/screen_orientation/ScreenOrientationController.h" 153 #include "modules/screen_orientation/ScreenOrientationController.h"
155 #include "platform/TraceEvent.h" 154 #include "platform/TraceEvent.h"
156 #include "platform/UserGestureIndicator.h" 155 #include "platform/UserGestureIndicator.h"
157 #include "platform/clipboard/ClipboardUtilities.h" 156 #include "platform/clipboard/ClipboardUtilities.h"
158 #include "platform/fonts/FontCache.h" 157 #include "platform/fonts/FontCache.h"
159 #include "platform/graphics/GraphicsContext.h" 158 #include "platform/graphics/GraphicsContext.h"
160 #include "platform/graphics/GraphicsLayerClient.h" 159 #include "platform/graphics/GraphicsLayerClient.h"
161 #include "platform/graphics/skia/SkiaUtils.h" 160 #include "platform/graphics/skia/SkiaUtils.h"
162 #include "platform/heap/Handle.h" 161 #include "platform/heap/Handle.h"
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 WebFrame::traceFrames(visitor, this); 1565 WebFrame::traceFrames(visitor, this);
1567 } 1566 }
1568 #endif 1567 #endif
1569 1568
1570 void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame) 1569 void WebLocalFrameImpl::setCoreFrame(PassRefPtrWillBeRawPtr<LocalFrame> frame)
1571 { 1570 {
1572 m_frame = frame; 1571 m_frame = frame;
1573 1572
1574 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used. 1573 // FIXME: we shouldn't add overhead to every frame by registering these obje cts when they're not used.
1575 if (m_frame) { 1574 if (m_frame) {
1576 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N otificationPresenterImpl());
1577 if (m_client)
1578 notificationPresenter->initialize(m_client->notificationPresenter()) ;
1579
1580 provideNotification(*m_frame, notificationPresenter.release());
1581 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create()); 1575 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create());
1582 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1576 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1583 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); 1577 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1584 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get())); 1578 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get()));
1585 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : 0)); 1579 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : 0));
1586 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); 1580 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
1587 1581
1588 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1582 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1589 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : 0); 1583 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : 0);
1590 } 1584 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 1955
1962 void WebLocalFrameImpl::invalidateAll() const 1956 void WebLocalFrameImpl::invalidateAll() const
1963 { 1957 {
1964 ASSERT(frame() && frame()->view()); 1958 ASSERT(frame() && frame()->view());
1965 FrameView* view = frame()->view(); 1959 FrameView* view = frame()->view();
1966 view->invalidateRect(view->frameRect()); 1960 view->invalidateRect(view->frameRect());
1967 invalidateScrollbar(); 1961 invalidateScrollbar();
1968 } 1962 }
1969 1963
1970 } // namespace blink 1964 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebLocalFrameImpl.h ('k') | Source/web/WebNotification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698