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

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.h

Issue 8714006: Add autoresize capability for Chromium. (Closed) Base URL: http://git.chromium.org/external/WebKit_trimmed.git@master
Patch Set: Created 9 years 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 virtual void setPageScaleFactorLimits(float minPageScale, float maxPageScale ); 167 virtual void setPageScaleFactorLimits(float minPageScale, float maxPageScale );
168 virtual float minimumPageScaleFactor() const; 168 virtual float minimumPageScaleFactor() const;
169 virtual float maximumPageScaleFactor() const; 169 virtual float maximumPageScaleFactor() const;
170 170
171 virtual float deviceScaleFactor() const; 171 virtual float deviceScaleFactor() const;
172 virtual void setDeviceScaleFactor(float); 172 virtual void setDeviceScaleFactor(float);
173 virtual bool isFixedLayoutModeEnabled() const; 173 virtual bool isFixedLayoutModeEnabled() const;
174 virtual void enableFixedLayoutMode(bool enable); 174 virtual void enableFixedLayoutMode(bool enable);
175 virtual WebSize fixedLayoutSize() const; 175 virtual WebSize fixedLayoutSize() const;
176 virtual void setFixedLayoutSize(const WebSize&); 176 virtual void setFixedLayoutSize(const WebSize&);
177 virtual void enableAutoSizeMode(
178 bool enable,
179 const WebSize& minSize,
180 const WebSize& maxSize);
177 virtual void performMediaPlayerAction( 181 virtual void performMediaPlayerAction(
178 const WebMediaPlayerAction& action, 182 const WebMediaPlayerAction& action,
179 const WebPoint& location); 183 const WebPoint& location);
180 virtual void copyImageAt(const WebPoint& point); 184 virtual void copyImageAt(const WebPoint& point);
181 virtual void dragSourceEndedAt( 185 virtual void dragSourceEndedAt(
182 const WebPoint& clientPoint, 186 const WebPoint& clientPoint,
183 const WebPoint& screenPoint, 187 const WebPoint& screenPoint,
184 WebDragOperation operation); 188 WebDragOperation operation);
185 virtual void dragSourceMovedTo( 189 virtual void dragSourceMovedTo(
186 const WebPoint& clientPoint, 190 const WebPoint& clientPoint,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only 318 // wParam, LPARAM lParam) in webkit\webkit\win\WebView.cpp. The only
315 // significant change in this function is the code to convert from a 319 // significant change in this function is the code to convert from a
316 // Keyboard event to the Right Mouse button down event. 320 // Keyboard event to the Right Mouse button down event.
317 bool sendContextMenuEvent(const WebKeyboardEvent&); 321 bool sendContextMenuEvent(const WebKeyboardEvent&);
318 322
319 // Notifies the WebView that a load has been committed. isNewNavigation 323 // Notifies the WebView that a load has been committed. isNewNavigation
320 // will be true if a new session history item should be created for that 324 // will be true if a new session history item should be created for that
321 // load. 325 // load.
322 void didCommitLoad(bool* isNewNavigation); 326 void didCommitLoad(bool* isNewNavigation);
323 327
328 // Notifies the WebView that layout is happening but the scollbar state
329 // hasn't been updated yet.
330 void layoutBeforeScrollbarUpdate();
331
332 // Indicates two things:
333 // 1) This frame may have a new layout now.
334 // 2) Calling layout() is a no-op.
335 // After calling WebWidget::layout(), expect to get this notification
336 // for each frame unless the frame did not need a layout.
337 void didUpdateLayout(WebFrameImpl*);
338
324 // Returns true if popup menus should be rendered by the browser, false if 339 // Returns true if popup menus should be rendered by the browser, false if
325 // they should be rendered by WebKit (which is the default). 340 // they should be rendered by WebKit (which is the default).
326 static bool useExternalPopupMenus(); 341 static bool useExternalPopupMenus();
327 342
328 bool contextMenuAllowed() const 343 bool contextMenuAllowed() const
329 { 344 {
330 return m_contextMenuAllowed; 345 return m_contextMenuAllowed;
331 } 346 }
332 347
333 // Set the disposition for how this webview is to be initially shown. 348 // Set the disposition for how this webview is to be initially shown.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 WebPermissionClient* m_permissionClient; 497 WebPermissionClient* m_permissionClient;
483 WebSpellCheckClient* m_spellCheckClient; 498 WebSpellCheckClient* m_spellCheckClient;
484 499
485 ChromeClientImpl m_chromeClientImpl; 500 ChromeClientImpl m_chromeClientImpl;
486 ContextMenuClientImpl m_contextMenuClientImpl; 501 ContextMenuClientImpl m_contextMenuClientImpl;
487 DragClientImpl m_dragClientImpl; 502 DragClientImpl m_dragClientImpl;
488 EditorClientImpl m_editorClientImpl; 503 EditorClientImpl m_editorClientImpl;
489 InspectorClientImpl m_inspectorClientImpl; 504 InspectorClientImpl m_inspectorClientImpl;
490 505
491 WebSize m_size; 506 WebSize m_size;
507 // If true, automatically resize the render view around its content.
508 bool m_autoSize;
509 bool m_inLayoutBeforeScrollbarUpdate;
510 // The last size sent out to the WebViewClient about an autosize change.
511 WebSize m_lastAutoSize;
512 // The lower bound on the size when autosizing.
513 WebSize m_minAutoSize;
514 // The upper bound on the size when autosizing.
515 WebSize m_maxAutoSize;
492 516
493 WebPoint m_lastMousePosition; 517 WebPoint m_lastMousePosition;
494 OwnPtr<WebCore::Page> m_page; 518 OwnPtr<WebCore::Page> m_page;
495 519
496 // This flag is set when a new navigation is detected. It is used to satisfy 520 // This flag is set when a new navigation is detected. It is used to satisfy
497 // the corresponding argument to WebFrameClient::didCommitProvisionalLoad. 521 // the corresponding argument to WebFrameClient::didCommitProvisionalLoad.
498 bool m_observedNewNavigation; 522 bool m_observedNewNavigation;
499 #ifndef NDEBUG 523 #ifndef NDEBUG
500 // Used to assert that the new navigation we observed is the same navigation 524 // Used to assert that the new navigation we observed is the same navigation
501 // when we make use of m_observedNewNavigation. 525 // when we make use of m_observedNewNavigation.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 OwnPtr<GeolocationClientProxy> m_geolocationClientProxy; 647 OwnPtr<GeolocationClientProxy> m_geolocationClientProxy;
624 648
625 #if ENABLE(GESTURE_RECOGNIZER) 649 #if ENABLE(GESTURE_RECOGNIZER)
626 OwnPtr<WebCore::PlatformGestureRecognizer> m_gestureRecognizer; 650 OwnPtr<WebCore::PlatformGestureRecognizer> m_gestureRecognizer;
627 #endif 651 #endif
628 }; 652 };
629 653
630 } // namespace WebKit 654 } // namespace WebKit
631 655
632 #endif 656 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698