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

Unified Diff: trunk/src/chrome/browser/guest_view/guest_view_base.h

Issue 446823002: Revert 287732 "<webview>: Move autosize from content to chrome." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/guest_view/guest_view_base.h
===================================================================
--- trunk/src/chrome/browser/guest_view/guest_view_base.h (revision 287745)
+++ trunk/src/chrome/browser/guest_view/guest_view_base.h (working copy)
@@ -103,26 +103,6 @@
// This gives the derived class an opportunity to perform some cleanup.
virtual void GuestDestroyed() {}
- // This method is invoked when the guest RenderView is ready, e.g. because we
- // recreated it after a crash.
- //
- // This gives the derived class an opportunity to perform some initialization
- // work.
- virtual void GuestReady() {}
-
- // This method is invoked when the contents auto-resized to give the container
- // an opportunity to match it if it wishes.
- //
- // This gives the derived class an opportunity to inform its container element
- // or perform other actions.
- virtual void GuestSizeChangedDueToAutoSize(const gfx::Size& old_size,
- const gfx::Size& new_size) {}
-
- // This method queries whether autosize is supported for this particular view.
- // By default, autosize is not supported. Derived classes can override this
- // behavior to support autosize.
- virtual bool IsAutoSizeSupported() const;
-
// This method queries whether drag-and-drop is enabled for this particular
// view. By default, drag-and-drop is disabled. Derived classes can override
// this behavior to enable drag-and-drop.
@@ -174,11 +154,6 @@
return !strcmp(GetViewType(), view_type);
}
- // Toggles autosize mode for this GuestView.
- void SetAutoSize(bool enabled,
- const gfx::Size& min_size,
- const gfx::Size& max_size);
-
base::WeakPtr<GuestViewBase> AsWeakPtr();
bool initialized() const { return initialized_; }
@@ -233,11 +208,7 @@
// BrowserPluginGuestDelegate implementation.
virtual void Destroy() OVERRIDE FINAL;
virtual void DidAttach() OVERRIDE FINAL;
- virtual void ElementSizeChanged(const gfx::Size& old_size,
- const gfx::Size& new_size) OVERRIDE FINAL;
virtual int GetGuestInstanceID() const OVERRIDE;
- virtual void GuestSizeChanged(const gfx::Size& old_size,
- const gfx::Size& new_size) OVERRIDE FINAL;
virtual void RegisterDestructionCallback(
const DestructionCallback& callback) OVERRIDE FINAL;
virtual void WillAttach(
@@ -268,7 +239,6 @@
// WebContentsObserver implementation.
virtual void DidStopLoading(
content::RenderViewHost* render_view_host) OVERRIDE FINAL;
- virtual void RenderViewReady() OVERRIDE FINAL;
virtual void WebContentsDestroyed() OVERRIDE FINAL;
// WebContentsDelegate implementation.
@@ -307,22 +277,6 @@
scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_;
- // The size of the container element.
- gfx::Size element_size_;
-
- // The size of the guest content. Note: In autosize mode, the container
- // element may not match the size of the guest.
- gfx::Size guest_size_;
-
- // Indicates whether autosize mode is enabled or not.
- bool auto_size_enabled_;
-
- // The maximum size constraints of the container element in autosize mode.
- gfx::Size max_auto_size_;
-
- // The minimum size constraints of the container element in autosize mode.
- gfx::Size min_auto_size_;
-
// This is used to ensure pending tasks will not fire after this object is
// destroyed.
base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698