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

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

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Dmitry's comments + sync. Created 4 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
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 void resetScaleStateImmediately(); 295 void resetScaleStateImmediately();
296 296
297 HitTestResult coreHitTestResultAt(const WebPoint&); 297 HitTestResult coreHitTestResultAt(const WebPoint&);
298 void invalidateRect(const IntRect&); 298 void invalidateRect(const IntRect&);
299 299
300 void setIgnoreInputEvents(bool newValue); 300 void setIgnoreInputEvents(bool newValue);
301 void setBaseBackgroundColor(WebColor); 301 void setBaseBackgroundColor(WebColor);
302 void setBackgroundColorOverride(WebColor); 302 void setBackgroundColorOverride(WebColor);
303 void setZoomFactorOverride(float); 303 void setZoomFactorOverride(float);
304 void setCompositorDeviceScaleFactorOverride(float); 304 void setCompositorDeviceScaleFactorOverride(float);
305 void setRootLayerTransform(const WebSize& offset, float scale); 305 void setRootLayerTransform(const TransformationMatrix&);
306 TransformationMatrix getRootLayerTransformForTesting() const;
307
308 // Returns the original device scale factor when overridden by DevTools, or
309 // deviceScaleFactor() otherwise.
310 float compositorDeviceScaleFactor() const;
306 311
307 Color baseBackgroundColor() const { return m_baseBackgroundColor; } 312 Color baseBackgroundColor() const { return m_baseBackgroundColor; }
308 313
309 WebColor backgroundColorOverride() const { return m_backgroundColorOverride; } 314 WebColor backgroundColorOverride() const { return m_backgroundColorOverride; }
310 315
311 Frame* focusedCoreFrame() const; 316 Frame* focusedCoreFrame() const;
312 317
313 // Returns the currently focused Element or null if no element has focus. 318 // Returns the currently focused Element or null if no element has focus.
314 Element* focusedElement() const; 319 Element* focusedElement() const;
315 320
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 382
378 // Indicates two things: 383 // Indicates two things:
379 // 1) This view may have a new layout now. 384 // 1) This view may have a new layout now.
380 // 2) Calling updateAllLifecyclePhases() is a no-op. 385 // 2) Calling updateAllLifecyclePhases() is a no-op.
381 // After calling WebWidget::updateAllLifecyclePhases(), expect to get this n otification 386 // After calling WebWidget::updateAllLifecyclePhases(), expect to get this n otification
382 // unless the view did not need a layout. 387 // unless the view did not need a layout.
383 void layoutUpdated(WebLocalFrameImpl*); 388 void layoutUpdated(WebLocalFrameImpl*);
384 389
385 void didChangeContentsSize(); 390 void didChangeContentsSize();
386 void pageScaleFactorChanged(); 391 void pageScaleFactorChanged();
392 void mainFrameScrollOffsetChanged();
387 393
388 // Returns true if popup menus should be rendered by the browser, false if 394 // Returns true if popup menus should be rendered by the browser, false if
389 // they should be rendered by WebKit (which is the default). 395 // they should be rendered by WebKit (which is the default).
390 static bool useExternalPopupMenus(); 396 static bool useExternalPopupMenus();
391 397
392 bool shouldAutoResize() const 398 bool shouldAutoResize() const
393 { 399 {
394 return m_shouldAutoResize; 400 return m_shouldAutoResize;
395 } 401 }
396 402
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 bool m_enableFakePageScaleAnimationForTesting; 686 bool m_enableFakePageScaleAnimationForTesting;
681 IntPoint m_fakePageScaleAnimationTargetPosition; 687 IntPoint m_fakePageScaleAnimationTargetPosition;
682 float m_fakePageScaleAnimationPageScaleFactor; 688 float m_fakePageScaleAnimationPageScaleFactor;
683 bool m_fakePageScaleAnimationUseAnchor; 689 bool m_fakePageScaleAnimationUseAnchor;
684 690
685 bool m_doingDragAndDrop; 691 bool m_doingDragAndDrop;
686 692
687 bool m_ignoreInputEvents; 693 bool m_ignoreInputEvents;
688 694
689 float m_compositorDeviceScaleFactorOverride; 695 float m_compositorDeviceScaleFactorOverride;
690 WebSize m_rootLayerOffset; 696 TransformationMatrix m_rootLayerTransform;
691 float m_rootLayerScale;
692 697
693 // Webkit expects keyPress events to be suppressed if the associated keyDown 698 // Webkit expects keyPress events to be suppressed if the associated keyDown
694 // event was handled. Safari implements this behavior by peeking out the 699 // event was handled. Safari implements this behavior by peeking out the
695 // associated WM_CHAR event if the keydown was handled. We emulate 700 // associated WM_CHAR event if the keydown was handled. We emulate
696 // this behavior by setting this flag if the keyDown was handled. 701 // this behavior by setting this flag if the keyDown was handled.
697 bool m_suppressNextKeypressEvent; 702 bool m_suppressNextKeypressEvent;
698 703
699 // Represents whether or not this object should process incoming IME events. 704 // Represents whether or not this object should process incoming IME events.
700 bool m_imeAcceptEvents; 705 bool m_imeAcceptEvents;
701 706
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor; 784 Persistent<ResizeViewportAnchor> m_resizeViewportAnchor;
780 }; 785 };
781 786
782 // We have no ways to check if the specified WebView is an instance of 787 // We have no ways to check if the specified WebView is an instance of
783 // WebViewImpl because WebViewImpl is the only implementation of WebView. 788 // WebViewImpl because WebViewImpl is the only implementation of WebView.
784 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true); 789 DEFINE_TYPE_CASTS(WebViewImpl, WebView, webView, true, true);
785 790
786 } // namespace blink 791 } // namespace blink
787 792
788 #endif 793 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698