OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 // Invoked when navigating to a pending entry. When invoked the | 285 // Invoked when navigating to a pending entry. When invoked the |
286 // NavigationController has configured its pending entry, but it has not yet | 286 // NavigationController has configured its pending entry, but it has not yet |
287 // been committed. | 287 // been committed. |
288 virtual void DidNavigateToPendingEntry(TabContents* tab); | 288 virtual void DidNavigateToPendingEntry(TabContents* tab); |
289 | 289 |
290 // Returns a pointer to a service to create JavaScript dialogs. The default | 290 // Returns a pointer to a service to create JavaScript dialogs. The default |
291 // pointer returned is to a stub service that marks all dialogs as suppressed | 291 // pointer returned is to a stub service that marks all dialogs as suppressed |
292 // and displays nothing. | 292 // and displays nothing. |
293 virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator(); | 293 virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator(); |
294 | 294 |
| 295 // Invoked when the preferred size of the contents has been changed. |
| 296 virtual void UpdatePreferredSize(const gfx::Size& pref_size); |
| 297 |
295 protected: | 298 protected: |
296 virtual ~TabContentsDelegate(); | 299 virtual ~TabContentsDelegate(); |
297 | 300 |
298 private: | 301 private: |
299 friend class TabContents; | 302 friend class TabContents; |
300 | 303 |
301 // Called when |this| becomes the TabContentsDelegate for |source|. | 304 // Called when |this| becomes the TabContentsDelegate for |source|. |
302 void Attach(TabContents* source); | 305 void Attach(TabContents* source); |
303 | 306 |
304 // Called when |this| is no longer the TabContentsDelegate for |source|. | 307 // Called when |this| is no longer the TabContentsDelegate for |source|. |
305 void Detach(TabContents* source); | 308 void Detach(TabContents* source); |
306 | 309 |
307 // The TabContents that this is currently a delegate for. | 310 // The TabContents that this is currently a delegate for. |
308 std::set<TabContents*> attached_contents_; | 311 std::set<TabContents*> attached_contents_; |
309 }; | 312 }; |
310 | 313 |
311 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 314 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
OLD | NEW |