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

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

Issue 513723003: Add pixel readback to page popup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #include "platform/UserGestureIndicator.h" 107 #include "platform/UserGestureIndicator.h"
108 #include "platform/exported/WebActiveGestureAnimation.h" 108 #include "platform/exported/WebActiveGestureAnimation.h"
109 #include "platform/fonts/FontCache.h" 109 #include "platform/fonts/FontCache.h"
110 #include "platform/graphics/Color.h" 110 #include "platform/graphics/Color.h"
111 #include "platform/graphics/Image.h" 111 #include "platform/graphics/Image.h"
112 #include "platform/graphics/ImageBuffer.h" 112 #include "platform/graphics/ImageBuffer.h"
113 #include "platform/scheduler/Scheduler.h" 113 #include "platform/scheduler/Scheduler.h"
114 #include "platform/scroll/ScrollbarTheme.h" 114 #include "platform/scroll/ScrollbarTheme.h"
115 #include "platform/weborigin/SchemeRegistry.h" 115 #include "platform/weborigin/SchemeRegistry.h"
116 #include "public/platform/Platform.h" 116 #include "public/platform/Platform.h"
117 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
117 #include "public/platform/WebDragData.h" 118 #include "public/platform/WebDragData.h"
118 #include "public/platform/WebFloatPoint.h" 119 #include "public/platform/WebFloatPoint.h"
119 #include "public/platform/WebGestureCurve.h" 120 #include "public/platform/WebGestureCurve.h"
120 #include "public/platform/WebImage.h" 121 #include "public/platform/WebImage.h"
121 #include "public/platform/WebLayerTreeView.h" 122 #include "public/platform/WebLayerTreeView.h"
122 #include "public/platform/WebURLRequest.h" 123 #include "public/platform/WebURLRequest.h"
123 #include "public/platform/WebVector.h" 124 #include "public/platform/WebVector.h"
124 #include "public/web/WebAXObject.h" 125 #include "public/web/WebAXObject.h"
125 #include "public/web/WebActiveWheelFlingParameters.h" 126 #include "public/web/WebActiveWheelFlingParameters.h"
126 #include "public/web/WebAutofillClient.h" 127 #include "public/web/WebAutofillClient.h"
(...skipping 1479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 WebPluginContainerImpl* pluginContainer = WebLocalFrameImpl::pluginContainer FromFrame(frame); 1607 WebPluginContainerImpl* pluginContainer = WebLocalFrameImpl::pluginContainer FromFrame(frame);
1607 if (pluginContainer) 1608 if (pluginContainer)
1608 pluginContainer->willStartLiveResize(); 1609 pluginContainer->willStartLiveResize();
1609 } 1610 }
1610 1611
1611 WebSize WebViewImpl::size() 1612 WebSize WebViewImpl::size()
1612 { 1613 {
1613 return m_size; 1614 return m_size;
1614 } 1615 }
1615 1616
1617 WebPoint WebViewImpl::screenPosition()
1618 {
1619 WebRect rect = m_client->rootWindowRect();
1620 return WebPoint(rect.x, rect.y);
1621 }
1622
1616 void WebViewImpl::resizePinchViewport(const WebSize& newSize) 1623 void WebViewImpl::resizePinchViewport(const WebSize& newSize)
1617 { 1624 {
1618 if (!pinchVirtualViewportEnabled()) 1625 if (!pinchVirtualViewportEnabled())
1619 return; 1626 return;
1620 1627
1621 page()->frameHost().pinchViewport().setSize(newSize); 1628 page()->frameHost().pinchViewport().setSize(newSize);
1622 } 1629 }
1623 1630
1624 WebLocalFrameImpl* WebViewImpl::localFrameRootTemporary() const 1631 WebLocalFrameImpl* WebViewImpl::localFrameRootTemporary() const
1625 { 1632 {
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 if (!m_page) 2482 if (!m_page)
2476 return m_baseBackgroundColor; 2483 return m_baseBackgroundColor;
2477 if (!m_page->mainFrame()) 2484 if (!m_page->mainFrame())
2478 return m_baseBackgroundColor; 2485 return m_baseBackgroundColor;
2479 if (!m_page->mainFrame()->isLocalFrame()) 2486 if (!m_page->mainFrame()->isLocalFrame())
2480 return m_baseBackgroundColor; 2487 return m_baseBackgroundColor;
2481 FrameView* view = m_page->deprecatedLocalMainFrame()->view(); 2488 FrameView* view = m_page->deprecatedLocalMainFrame()->view();
2482 return view->documentBackgroundColor().rgb(); 2489 return view->documentBackgroundColor().rgb();
2483 } 2490 }
2484 2491
2492 WebPagePopup* WebViewImpl::popup() const
2493 {
2494 return m_pagePopup.get();
2495 }
2496
2485 bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length) 2497 bool WebViewImpl::caretOrSelectionRange(size_t* location, size_t* length)
2486 { 2498 {
2487 const LocalFrame* focused = toLocalFrame(focusedCoreFrame()); 2499 const LocalFrame* focused = toLocalFrame(focusedCoreFrame());
2488 if (!focused) 2500 if (!focused)
2489 return false; 2501 return false;
2490 2502
2491 PlainTextRange selectionOffsets = focused->inputMethodController().getSelect ionOffsets(); 2503 PlainTextRange selectionOffsets = focused->inputMethodController().getSelect ionOffsets();
2492 if (selectionOffsets.isNull()) 2504 if (selectionOffsets.isNull())
2493 return false; 2505 return false;
2494 2506
(...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
4273 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4285 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4274 4286
4275 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4287 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4276 return false; 4288 return false;
4277 4289
4278 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4290 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4279 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4291 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4280 } 4292 }
4281 4293
4282 } // namespace blink 4294 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebWidget.h » ('j') | public/web/WebWidget.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698