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

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

Issue 2729543002: Rename platform/Widget to platform/FrameViewBase in web. (Closed)
Patch Set: Created 3 years, 9 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 private: 83 private:
84 explicit PagePopupChromeClient(WebPagePopupImpl* popup) : m_popup(popup) { 84 explicit PagePopupChromeClient(WebPagePopupImpl* popup) : m_popup(popup) {
85 DCHECK(m_popup->widgetClient()); 85 DCHECK(m_popup->widgetClient());
86 } 86 }
87 87
88 void closeWindowSoon() override { m_popup->closePopup(); } 88 void closeWindowSoon() override { m_popup->closePopup(); }
89 89
90 IntRect rootWindowRect() override { return m_popup->windowRectInScreen(); } 90 IntRect rootWindowRect() override { return m_popup->windowRectInScreen(); }
91 91
92 IntRect viewportToScreen(const IntRect& rect, 92 IntRect viewportToScreen(const IntRect& rect,
93 const Widget* widget) const override { 93 const FrameViewBase* frameViewBase) const override {
94 WebRect rectInScreen(rect); 94 WebRect rectInScreen(rect);
95 WebRect windowRect = m_popup->windowRectInScreen(); 95 WebRect windowRect = m_popup->windowRectInScreen();
96 m_popup->widgetClient()->convertViewportToWindow(&rectInScreen); 96 m_popup->widgetClient()->convertViewportToWindow(&rectInScreen);
97 rectInScreen.x += windowRect.x; 97 rectInScreen.x += windowRect.x;
98 rectInScreen.y += windowRect.y; 98 rectInScreen.y += windowRect.y;
99 return rectInScreen; 99 return rectInScreen;
100 } 100 }
101 101
102 float windowToViewportScalar(const float scalarValue) const override { 102 float windowToViewportScalar(const float scalarValue) const override {
103 WebFloatRect viewportRect(0, 0, scalarValue, 0); 103 WebFloatRect viewportRect(0, 0, scalarValue, 0);
(...skipping 12 matching lines...) Expand all
116 fprintf(stderr, "CONSOLE MESSSAGE:%u: %s\n", lineNumber, 116 fprintf(stderr, "CONSOLE MESSSAGE:%u: %s\n", lineNumber,
117 message.utf8().data()); 117 message.utf8().data());
118 #endif 118 #endif
119 } 119 }
120 120
121 void invalidateRect(const IntRect& paintRect) override { 121 void invalidateRect(const IntRect& paintRect) override {
122 if (!paintRect.isEmpty()) 122 if (!paintRect.isEmpty())
123 m_popup->widgetClient()->didInvalidateRect(paintRect); 123 m_popup->widgetClient()->didInvalidateRect(paintRect);
124 } 124 }
125 125
126 void scheduleAnimation(Widget*) override { 126 void scheduleAnimation(FrameViewBase*) 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 m_popup->m_webView->mainFrameImpl()->frameWidget()->scheduleAnimation(); 130 m_popup->m_webView->mainFrameImpl()->frameWidget()->scheduleAnimation();
131 131
132 if (m_popup->isAcceleratedCompositingActive()) { 132 if (m_popup->isAcceleratedCompositingActive()) {
133 DCHECK(m_popup->m_layerTreeView); 133 DCHECK(m_popup->m_layerTreeView);
134 m_popup->m_layerTreeView->setNeedsBeginFrame(); 134 m_popup->m_layerTreeView->setNeedsBeginFrame();
135 return; 135 return;
136 } 136 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 // A WebPagePopupImpl instance usually has two references. 601 // A WebPagePopupImpl instance usually has two references.
602 // - One owned by the instance itself. It represents the visible widget. 602 // - One owned by the instance itself. It represents the visible widget.
603 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 603 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
604 // WebPagePopupImpl to close. 604 // WebPagePopupImpl to close.
605 // We need them because the closing operation is asynchronous and the widget 605 // We need them because the closing operation is asynchronous and the widget
606 // can be closed while the WebViewImpl is unaware of it. 606 // can be closed while the WebViewImpl is unaware of it.
607 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 607 return adoptRef(new WebPagePopupImpl(client)).leakRef();
608 } 608 }
609 609
610 } // namespace blink 610 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebNode.cpp ('k') | third_party/WebKit/Source/web/WebPluginContainerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698