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

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: Reupload Created 7 years, 2 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 const WebPoint& screenPoint, 282 const WebPoint& screenPoint,
283 int keyModifiers); 283 int keyModifiers);
284 virtual void spellingMarkers(WebVector<uint32_t>* markers); 284 virtual void spellingMarkers(WebVector<uint32_t>* markers);
285 virtual unsigned long createUniqueIdentifierForRequest(); 285 virtual unsigned long createUniqueIdentifierForRequest();
286 virtual void inspectElementAt(const WebPoint& point); 286 virtual void inspectElementAt(const WebPoint& point);
287 virtual WebString inspectorSettings() const; 287 virtual WebString inspectorSettings() const;
288 virtual void setInspectorSettings(const WebString& settings); 288 virtual void setInspectorSettings(const WebString& settings);
289 virtual bool inspectorSetting(const WebString& key, WebString* value) const; 289 virtual bool inspectorSetting(const WebString& key, WebString* value) const;
290 virtual void setInspectorSetting(const WebString& key, 290 virtual void setInspectorSetting(const WebString& key,
291 const WebString& value); 291 const WebString& value);
292 virtual void setDeviceEmulationParameters(bool enabled, float deviceScaleFac tor, float rootLayerScale);
292 virtual WebDevToolsAgent* devToolsAgent(); 293 virtual WebDevToolsAgent* devToolsAgent();
293 virtual WebAXObject accessibilityObject(); 294 virtual WebAXObject accessibilityObject();
294 virtual void applyAutofillSuggestions( 295 virtual void applyAutofillSuggestions(
295 const WebNode&, 296 const WebNode&,
296 const WebVector<WebString>& names, 297 const WebVector<WebString>& names,
297 const WebVector<WebString>& labels, 298 const WebVector<WebString>& labels,
298 const WebVector<WebString>& icons, 299 const WebVector<WebString>& icons,
299 const WebVector<int>& itemIDs, 300 const WebVector<int>& itemIDs,
300 int separatorIndex); 301 int separatorIndex);
301 virtual void hidePopups(); 302 virtual void hidePopups();
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 DragAction, 622 DragAction,
622 int keyModifiers); 623 int keyModifiers);
623 624
624 void configureAutoResizeMode(); 625 void configureAutoResizeMode();
625 626
626 void setIsAcceleratedCompositingActive(bool); 627 void setIsAcceleratedCompositingActive(bool);
627 void doComposite(); 628 void doComposite();
628 void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&); 629 void doPixelReadbackToCanvas(WebCanvas*, const WebCore::IntRect&);
629 void reallocateRenderer(); 630 void reallocateRenderer();
630 void updateLayerTreeViewport(); 631 void updateLayerTreeViewport();
632 void updateRootLayerTransform();
633 void updateLayerTreeDeviceScaleFactor();
631 634
632 // Helper function: Widens the width of |source| by the specified margins 635 // Helper function: Widens the width of |source| by the specified margins
633 // while keeping it smaller than page width. 636 // while keeping it smaller than page width.
634 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i nt minimumMargin); 637 WebRect widenRectWithinPageBounds(const WebRect& source, int targetMargin, i nt minimumMargin);
635 638
636 void pointerLockMouseEvent(const WebInputEvent&); 639 void pointerLockMouseEvent(const WebInputEvent&);
637 640
638 // PageWidgetEventHandler functions 641 // PageWidgetEventHandler functions
639 virtual void handleMouseLeave(WebCore::Frame&, const WebMouseEvent&) OVERRID E; 642 virtual void handleMouseLeave(WebCore::Frame&, const WebMouseEvent&) OVERRID E;
640 virtual void handleMouseDown(WebCore::Frame&, const WebMouseEvent&) OVERRIDE ; 643 virtual void handleMouseDown(WebCore::Frame&, const WebMouseEvent&) OVERRIDE ;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 WebCore::IntPoint m_fakePageScaleAnimationTargetPosition; 723 WebCore::IntPoint m_fakePageScaleAnimationTargetPosition;
721 float m_fakePageScaleAnimationPageScaleFactor; 724 float m_fakePageScaleAnimationPageScaleFactor;
722 bool m_fakePageScaleAnimationUseAnchor; 725 bool m_fakePageScaleAnimationUseAnchor;
723 726
724 bool m_contextMenuAllowed; 727 bool m_contextMenuAllowed;
725 728
726 bool m_doingDragAndDrop; 729 bool m_doingDragAndDrop;
727 730
728 bool m_ignoreInputEvents; 731 bool m_ignoreInputEvents;
729 732
733 float m_emulatedDeviceScaleFactor;
734 float m_rootLayerScale;
735
730 // Webkit expects keyPress events to be suppressed if the associated keyDown 736 // Webkit expects keyPress events to be suppressed if the associated keyDown
731 // event was handled. Safari implements this behavior by peeking out the 737 // event was handled. Safari implements this behavior by peeking out the
732 // associated WM_CHAR event if the keydown was handled. We emulate 738 // associated WM_CHAR event if the keydown was handled. We emulate
733 // this behavior by setting this flag if the keyDown was handled. 739 // this behavior by setting this flag if the keyDown was handled.
734 bool m_suppressNextKeypressEvent; 740 bool m_suppressNextKeypressEvent;
735 741
736 // Represents whether or not this object should process incoming IME events. 742 // Represents whether or not this object should process incoming IME events.
737 bool m_imeAcceptEvents; 743 bool m_imeAcceptEvents;
738 744
739 // The available drag operations (copy, move link...) allowed by the source. 745 // The available drag operations (copy, move link...) allowed by the source.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 inline WebViewImpl* toWebViewImpl(WebView* webView) 838 inline WebViewImpl* toWebViewImpl(WebView* webView)
833 { 839 {
834 // 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
835 // WebViewImpl because WebViewImpl is the only implementation of WebView. 841 // WebViewImpl because WebViewImpl is the only implementation of WebView.
836 return static_cast<WebViewImpl*>(webView); 842 return static_cast<WebViewImpl*>(webView);
837 } 843 }
838 844
839 } // namespace WebKit 845 } // namespace WebKit
840 846
841 #endif 847 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698