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

Unified Diff: chrome/browser/cocoa/tab_contents_controller.h

Issue 3547008: Handle resize corner layout entirely in the platform BrowserWindow*/BrowserView* code... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
« no previous file with comments | « chrome/browser/cocoa/sidebar_controller.mm ('k') | chrome/browser/cocoa/tab_contents_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_contents_controller.h
===================================================================
--- chrome/browser/cocoa/tab_contents_controller.h (revision 66034)
+++ chrome/browser/cocoa/tab_contents_controller.h (working copy)
@@ -8,9 +8,23 @@
#include <Cocoa/Cocoa.h>
+#include "base/scoped_ptr.h"
+
class TabContents;
+class TabContentsNotificationBridge;
+@class TabContentsController;
-// A class that controls the web contents of a tab. It manages displaying the
+// The interface for the tab contents view controller's delegate.
+
+@protocol TabContentsControllerDelegate
+
+// Tells the delegate when the tab contents view's frame is about to change.
+- (void)tabContentsViewFrameWillChange:(TabContentsController*)source
+ frameRect:(NSRect)frameRect;
+
+@end
+
+// A class that controls the TabContents view. It manages displaying the
// native view for a given TabContents.
// Note that just creating the class does not display the view. We defer
// inserting it until the box is the correct size to avoid multiple resize
@@ -20,12 +34,28 @@
@interface TabContentsController : NSViewController {
@private
TabContents* contents_; // weak
+ // Delegate to be notified about size changes.
+ id<TabContentsControllerDelegate> delegate_; // weak
+ scoped_ptr<TabContentsNotificationBridge> tabContentsBridge_;
}
@property(readonly, nonatomic) TabContents* tabContents;
-// Create the contents of a tab represented by |contents|.
-- (id)initWithContents:(TabContents*)contents;
+- (id)initWithContents:(TabContents*)contents
+ delegate:(id<TabContentsControllerDelegate>)delegate;
+// Call when the tab contents is about to be replaced with the currently
+// selected tab contents to do not trigger unnecessary content relayout.
+- (void)ensureContentsSizeDoesNotChange;
+
+// Call when the tab view is properly sized and the render widget host view
+// should be put into the view hierarchy.
+- (void)ensureContentsVisible;
+
+// Call to change the underlying tab contents object. View is not changed,
+// call |-ensureContentsVisible| to display the |newContents|'s render widget
+// host view.
+- (void)changeTabContents:(TabContents*)newContents;
+
// Called when the tab contents is the currently selected tab and is about to be
// removed from the view hierarchy.
- (void)willBecomeUnselectedTab;
@@ -35,14 +65,6 @@
// enabled.
- (void)willBecomeSelectedTab;
-// Call when the tab contents is about to be replaced with the currently
-// selected tab contents to do not trigger unnecessary content relayout.
-- (void)ensureContentsSizeDoesNotChange;
-
-// Call when the tab view is properly sized and the render widget host view
-// should be put into the view hierarchy.
-- (void)ensureContentsVisible;
-
// Called when the tab contents is updated in some non-descript way (the
// notification from the model isn't specific). |updatedContents| could reflect
// an entirely new tab contents object.
« no previous file with comments | « chrome/browser/cocoa/sidebar_controller.mm ('k') | chrome/browser/cocoa/tab_contents_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698