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

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

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 virtual void setContinuousPaintingEnabled(bool); 318 virtual void setContinuousPaintingEnabled(bool);
319 virtual void setShowScrollBottleneckRects(bool); 319 virtual void setShowScrollBottleneckRects(bool);
320 320
321 // WebViewImpl 321 // WebViewImpl
322 322
323 void suppressInvalidations(bool enable); 323 void suppressInvalidations(bool enable);
324 void invalidateRect(const WebCore::IntRect&); 324 void invalidateRect(const WebCore::IntRect&);
325 325
326 void setIgnoreInputEvents(bool newValue); 326 void setIgnoreInputEvents(bool newValue);
327 WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get (); } 327 WebDevToolsAgentPrivate* devToolsAgentPrivate() { return m_devToolsAgent.get (); }
328 void setDeviceEmulationScales(bool enabled, float deviceScaleFactor, float r ootLayerScale);
328 329
329 WebCore::Color baseBackgroundColor() const { return m_baseBackgroundColor; } 330 WebCore::Color baseBackgroundColor() const { return m_baseBackgroundColor; }
330 331
331 PageOverlayList* pageOverlays() const { return m_pageOverlays.get(); } 332 PageOverlayList* pageOverlays() const { return m_pageOverlays.get(); }
332 333
333 void setOverlayLayer(WebCore::GraphicsLayer*); 334 void setOverlayLayer(WebCore::GraphicsLayer*);
334 335
335 const WebPoint& lastMouseDownPoint() const 336 const WebPoint& lastMouseDownPoint() const
336 { 337 {
337 return m_lastMouseDownPoint; 338 return m_lastMouseDownPoint;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 DragAction, 620 DragAction,
620 int keyModifiers); 621 int keyModifiers);
621 622
622 void configureAutoResizeMode(); 623 void configureAutoResizeMode();
623 624
624 void setIsAcceleratedCompositingActive(bool); 625 void setIsAcceleratedCompositingActive(bool);
625 void doComposite(); 626 void doComposite();
626 void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&); 627 void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
627 void reallocateRenderer(); 628 void reallocateRenderer();
628 void updateLayerTreeViewport(); 629 void updateLayerTreeViewport();
630 void updateRootLayerTransform();
631 void updateLayerTreeDeviceScaleFactor();
629 632
630 // Helper function: Widens the width of |source| by the specified margins 633 // Helper function: Widens the width of |source| by the specified margins
631 // while keeping it smaller than page width. 634 // while keeping it smaller than page width.
632 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i nt minimumMargin); 635 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i nt minimumMargin);
633 636
634 void pointerLockMouseEvent(const WebInputEvent&); 637 void pointerLockMouseEvent(const WebInputEvent&);
635 638
636 // PageWidgetEventHandler functions 639 // PageWidgetEventHandler functions
637 virtual void handleMouseLeave(WebCore::Frame&, const WebMouseEvent&) OVERRID E; 640 virtual void handleMouseLeave(WebCore::Frame&, const WebMouseEvent&) OVERRID E;
638 virtual void handleMouseDown(WebCore::Frame&, const WebMouseEvent&) OVERRIDE ; 641 virtual void handleMouseDown(WebCore::Frame&, const WebMouseEvent&) OVERRIDE ;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 WebCore::IntPoint m_fakePageScaleAnimationTargetPosition; 720 WebCore::IntPoint m_fakePageScaleAnimationTargetPosition;
718 float m_fakePageScaleAnimationPageScaleFactor; 721 float m_fakePageScaleAnimationPageScaleFactor;
719 bool m_fakePageScaleAnimationUseAnchor; 722 bool m_fakePageScaleAnimationUseAnchor;
720 723
721 bool m_contextMenuAllowed; 724 bool m_contextMenuAllowed;
722 725
723 bool m_doingDragAndDrop; 726 bool m_doingDragAndDrop;
724 727
725 bool m_ignoreInputEvents; 728 bool m_ignoreInputEvents;
726 729
730 bool m_emulatingDeviceScales;
pfeldman 2013/09/19 12:46:05 Lets assume m_emulatingDeviceScales is m_emulatedD
dgozman 2013/09/19 13:59:38 Done.
731 float m_rootLayerScale;
732 float m_emulatedDeviceScaleFactor;
733
727 // Webkit expects keyPress events to be suppressed if the associated keyDown 734 // Webkit expects keyPress events to be suppressed if the associated keyDown
728 // event was handled. Safari implements this behavior by peeking out the 735 // event was handled. Safari implements this behavior by peeking out the
729 // associated WM_CHAR event if the keydown was handled. We emulate 736 // associated WM_CHAR event if the keydown was handled. We emulate
730 // this behavior by setting this flag if the keyDown was handled. 737 // this behavior by setting this flag if the keyDown was handled.
731 bool m_suppressNextKeypressEvent; 738 bool m_suppressNextKeypressEvent;
732 739
733 // Represents whether or not this object should process incoming IME events. 740 // Represents whether or not this object should process incoming IME events.
734 bool m_imeAcceptEvents; 741 bool m_imeAcceptEvents;
735 742
736 // The available drag operations (copy, move link...) allowed by the source. 743 // The available drag operations (copy, move link...) allowed by the source.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 inline WebViewImpl* toWebViewImpl(WebView* webView) 838 inline WebViewImpl* toWebViewImpl(WebView* webView)
832 { 839 {
833 // We have no ways to check if the specified WebView is an instance of 840 // We have no ways to check if the specified WebView is an instance of
834 // WebViewImpl because WebViewImpl is the only implementation of WebView. 841 // WebViewImpl because WebViewImpl is the only implementation of WebView.
835 return static_cast<WebViewImpl*>(webView); 842 return static_cast<WebViewImpl*>(webView);
836 } 843 }
837 844
838 } // namespace WebKit 845 } // namespace WebKit
839 846
840 #endif 847 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698