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

Side by Side Diff: third_party/WebKit/Source/web/WebPagePopupImpl.cpp

Issue 2826893003: Remove ScrollableArea::GetFrameViewBase and move ScheduleAnimation into subclasses. (Closed)
Patch Set: Remove UNREACHED Created 3 years, 8 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 fprintf(stderr, "CONSOLE MESSSAGE:%u: %s\n", line_number, 116 fprintf(stderr, "CONSOLE MESSSAGE:%u: %s\n", line_number,
117 message.Utf8().Data()); 117 message.Utf8().Data());
118 #endif 118 #endif
119 } 119 }
120 120
121 void InvalidateRect(const IntRect& paint_rect) override { 121 void InvalidateRect(const IntRect& paint_rect) override {
122 if (!paint_rect.IsEmpty()) 122 if (!paint_rect.IsEmpty())
123 popup_->WidgetClient()->DidInvalidateRect(paint_rect); 123 popup_->WidgetClient()->DidInvalidateRect(paint_rect);
124 } 124 }
125 125
126 void ScheduleAnimation(FrameViewBase*) override { 126 void ScheduleAnimation(LocalFrame*) override {
127 // Calling scheduleAnimation on m_webView so WebViewTestProxy will call 127 // Calling scheduleAnimation on m_webView so WebViewTestProxy will call
128 // beginFrame. 128 // beginFrame.
129 if (LayoutTestSupport::IsRunningLayoutTest()) 129 if (LayoutTestSupport::IsRunningLayoutTest())
130 popup_->web_view_->MainFrameImpl()->FrameWidget()->ScheduleAnimation(); 130 popup_->web_view_->MainFrameImpl()->FrameWidget()->ScheduleAnimation();
131 131
132 if (popup_->layer_tree_view_) { 132 if (popup_->layer_tree_view_) {
133 popup_->layer_tree_view_->SetNeedsBeginFrame(); 133 popup_->layer_tree_view_->SetNeedsBeginFrame();
134 return; 134 return;
135 } 135 }
136 popup_->widget_client_->ScheduleAnimation(); 136 popup_->widget_client_->ScheduleAnimation();
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 // A WebPagePopupImpl instance usually has two references. 602 // A WebPagePopupImpl instance usually has two references.
603 // - One owned by the instance itself. It represents the visible widget. 603 // - One owned by the instance itself. It represents the visible widget.
604 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 604 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
605 // WebPagePopupImpl to close. 605 // WebPagePopupImpl to close.
606 // We need them because the closing operation is asynchronous and the widget 606 // We need them because the closing operation is asynchronous and the widget
607 // can be closed while the WebViewImpl is unaware of it. 607 // can be closed while the WebViewImpl is unaware of it.
608 return AdoptRef(new WebPagePopupImpl(client)).LeakRef(); 608 return AdoptRef(new WebPagePopupImpl(client)).LeakRef();
609 } 609 }
610 610
611 } // namespace blink 611 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698