OLD | NEW |
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 #include "core/rendering/HitTestResult.h" | 129 #include "core/rendering/HitTestResult.h" |
130 #include "core/rendering/RenderBox.h" | 130 #include "core/rendering/RenderBox.h" |
131 #include "core/rendering/RenderFrame.h" | 131 #include "core/rendering/RenderFrame.h" |
132 #include "core/rendering/RenderLayer.h" | 132 #include "core/rendering/RenderLayer.h" |
133 #include "core/rendering/RenderObject.h" | 133 #include "core/rendering/RenderObject.h" |
134 #include "core/rendering/RenderTreeAsText.h" | 134 #include "core/rendering/RenderTreeAsText.h" |
135 #include "core/rendering/RenderView.h" | 135 #include "core/rendering/RenderView.h" |
136 #include "core/rendering/style/StyleInheritedData.h" | 136 #include "core/rendering/style/StyleInheritedData.h" |
137 #include "core/timing/Performance.h" | 137 #include "core/timing/Performance.h" |
138 #include "modules/geolocation/GeolocationController.h" | 138 #include "modules/geolocation/GeolocationController.h" |
139 #include "modules/notifications/NotificationController.h" | |
140 #include "modules/notifications/NotificationPermissionClient.h" | 139 #include "modules/notifications/NotificationPermissionClient.h" |
141 #include "modules/screen_orientation/ScreenOrientationController.h" | 140 #include "modules/screen_orientation/ScreenOrientationController.h" |
142 #include "platform/TraceEvent.h" | 141 #include "platform/TraceEvent.h" |
143 #include "platform/UserGestureIndicator.h" | 142 #include "platform/UserGestureIndicator.h" |
144 #include "platform/clipboard/ClipboardUtilities.h" | 143 #include "platform/clipboard/ClipboardUtilities.h" |
145 #include "platform/fonts/FontCache.h" | 144 #include "platform/fonts/FontCache.h" |
146 #include "platform/graphics/GraphicsContext.h" | 145 #include "platform/graphics/GraphicsContext.h" |
147 #include "platform/graphics/GraphicsLayerClient.h" | 146 #include "platform/graphics/GraphicsLayerClient.h" |
148 #include "platform/graphics/skia/SkiaUtils.h" | 147 #include "platform/graphics/skia/SkiaUtils.h" |
149 #include "platform/heap/Handle.h" | 148 #include "platform/heap/Handle.h" |
(...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 | 1548 |
1550 cancelPendingScopingEffort(); | 1549 cancelPendingScopingEffort(); |
1551 } | 1550 } |
1552 | 1551 |
1553 void WebLocalFrameImpl::setCoreFrame(PassRefPtr<LocalFrame> frame) | 1552 void WebLocalFrameImpl::setCoreFrame(PassRefPtr<LocalFrame> frame) |
1554 { | 1553 { |
1555 m_frame = frame; | 1554 m_frame = frame; |
1556 | 1555 |
1557 // FIXME: we shouldn't add overhead to every frame by registering these obje
cts when they're not used. | 1556 // FIXME: we shouldn't add overhead to every frame by registering these obje
cts when they're not used. |
1558 if (m_frame) { | 1557 if (m_frame) { |
1559 OwnPtr<NotificationPresenterImpl> notificationPresenter = adoptPtr(new N
otificationPresenterImpl()); | |
1560 if (m_client) | |
1561 notificationPresenter->initialize(m_client->notificationPresenter())
; | |
1562 | |
1563 provideNotification(*m_frame, notificationPresenter.release()); | |
1564 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl
ientImpl::create()); | 1558 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl
ientImpl::create()); |
1565 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); | 1559 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); |
1566 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); | 1560 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); |
1567 m_geolocationClientProxy->setController(GeolocationController::from(m_fr
ame.get())); | 1561 m_geolocationClientProxy->setController(GeolocationController::from(m_fr
ame.get())); |
1568 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web
MIDIClient() : 0)); | 1562 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web
MIDIClient() : 0)); |
1569 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); | 1563 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); |
1570 | 1564 |
1571 if (RuntimeEnabledFeatures::screenOrientationEnabled()) | 1565 if (RuntimeEnabledFeatures::screenOrientationEnabled()) |
1572 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client
->webScreenOrientationClient() : 0); | 1566 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client
->webScreenOrientationClient() : 0); |
1573 } | 1567 } |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1877 | 1871 |
1878 void WebLocalFrameImpl::invalidateAll() const | 1872 void WebLocalFrameImpl::invalidateAll() const |
1879 { | 1873 { |
1880 ASSERT(frame() && frame()->view()); | 1874 ASSERT(frame() && frame()->view()); |
1881 FrameView* view = frame()->view(); | 1875 FrameView* view = frame()->view(); |
1882 view->invalidateRect(view->frameRect()); | 1876 view->invalidateRect(view->frameRect()); |
1883 invalidateScrollbar(); | 1877 invalidateScrollbar(); |
1884 } | 1878 } |
1885 | 1879 |
1886 } // namespace blink | 1880 } // namespace blink |
OLD | NEW |