OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // Returns the native window framing the view containing the tab contents. | 279 // Returns the native window framing the view containing the tab contents. |
280 virtual gfx::NativeWindow GetFrameNativeWindow() { return NULL; } | 280 virtual gfx::NativeWindow GetFrameNativeWindow() { return NULL; } |
281 | 281 |
282 // Notifies the delegate about the creation of a new TabContents. This | 282 // Notifies the delegate about the creation of a new TabContents. This |
283 // typically happens when popups are created. | 283 // typically happens when popups are created. |
284 virtual void TabContentsCreated(TabContents* new_contents) {} | 284 virtual void TabContentsCreated(TabContents* new_contents) {} |
285 | 285 |
286 // Returns whether infobars are enabled. Overrideable by child classes. | 286 // Returns whether infobars are enabled. Overrideable by child classes. |
287 virtual bool infobars_enabled() { return true; } | 287 virtual bool infobars_enabled() { return true; } |
288 | 288 |
| 289 // Whether the renderer should report its preferred size when it changes by |
| 290 // calling UpdatePreferredSize(). |
| 291 // Note that this is set when the RenderViewHost is created and cannot be |
| 292 // changed after that. |
| 293 virtual bool ShouldEnablePreferredSizeNotifications() { return false; } |
| 294 |
289 // Notification that the preferred size of the contents has changed. | 295 // Notification that the preferred size of the contents has changed. |
290 // Only called if RenderViewHost::EnablePreferredSizeChangedMode() was called. | 296 // Only called if ShouldEnablePreferredSizeNotifications() returns true. |
291 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} | 297 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} |
292 | 298 |
293 protected: | 299 protected: |
294 ~TabContentsDelegate() {} | 300 ~TabContentsDelegate() {} |
295 }; | 301 }; |
296 | 302 |
297 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 303 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
OLD | NEW |