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

Unified Diff: third_party/WebKit/Source/web/ChromeClientImpl.cpp

Issue 2868173002: Add PlatformLocalFrame class. (Closed)
Patch Set: this time with new file included Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index 34e37bb1fee49a49d67e2df749fcbcd5ef9fd410..6b07718f28f537bb68af3d6959d69b5638f440f9 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -556,25 +556,26 @@ void ChromeClientImpl::InvalidateRect(const IntRect& update_rect) {
web_view_->InvalidateRect(update_rect);
}
-void ChromeClientImpl::ScheduleAnimation(LocalFrame* frame) {
- frame = &frame->LocalFrameRoot();
+void ChromeClientImpl::ScheduleAnimation(
+ const PlatformLocalFrame* platform_frame) {
+ DCHECK(platform_frame->IsLocalFrame());
+ LocalFrame& frame = ToLocalFrame(platform_frame)->LocalFrameRoot();
// If the frame is still being created, it might not yet have a WebWidget.
// FIXME: Is this the right thing to do? Is there a way to avoid having
// a local frame root that doesn't have a WebWidget? During initialization
// there is no content to draw so this call serves no purpose.
- if (WebLocalFrameImpl::FromFrame(frame) &&
- WebLocalFrameImpl::FromFrame(frame)->FrameWidget())
- WebLocalFrameImpl::FromFrame(frame)->FrameWidget()->ScheduleAnimation();
+ if (WebLocalFrameImpl::FromFrame(&frame) &&
+ WebLocalFrameImpl::FromFrame(&frame)->FrameWidget())
+ WebLocalFrameImpl::FromFrame(&frame)->FrameWidget()->ScheduleAnimation();
}
IntRect ChromeClientImpl::ViewportToScreen(
const IntRect& rect_in_viewport,
- const FrameViewBase* frame_view_base) const {
+ const PlatformLocalFrame* platform_frame) const {
WebRect screen_rect(rect_in_viewport);
- DCHECK(frame_view_base->IsFrameView());
- const FrameView* view = ToFrameView(frame_view_base);
- LocalFrame& frame = view->GetFrame().LocalFrameRoot();
+ DCHECK(platform_frame->IsLocalFrame());
+ LocalFrame& frame = ToLocalFrame(platform_frame)->LocalFrameRoot();
WebWidgetClient* client =
WebLocalFrameImpl::FromFrame(&frame)->FrameWidget()->Client();
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.h ('k') | third_party/WebKit/Source/web/ColorChooserPopupUIController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698