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

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

Powered by Google App Engine
This is Rietveld 408576698