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_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 int content_restrictions() const { return content_restrictions_; } | 489 int content_restrictions() const { return content_restrictions_; } |
490 void SetContentRestrictions(int restrictions); | 490 void SetContentRestrictions(int restrictions); |
491 | 491 |
492 // Query the WebUIFactory for the TypeID for the current URL. | 492 // Query the WebUIFactory for the TypeID for the current URL. |
493 WebUI::TypeID GetWebUITypeForCurrentState(); | 493 WebUI::TypeID GetWebUITypeForCurrentState(); |
494 | 494 |
495 // Returns the WebUI for the current state of the tab. This will either be | 495 // Returns the WebUI for the current state of the tab. This will either be |
496 // the pending WebUI, the committed WebUI, or NULL. | 496 // the pending WebUI, the committed WebUI, or NULL. |
497 WebUI* GetWebUIForCurrentState(); | 497 WebUI* GetWebUIForCurrentState(); |
498 | 498 |
| 499 // Invoked when the preferred size of the contents has been changed. |
| 500 void UpdatePreferredSize(const gfx::Size& pref_size); |
| 501 |
499 protected: | 502 protected: |
500 friend class TabContentsObserver; | 503 friend class TabContentsObserver; |
501 | 504 |
502 // Add and remove observers for page navigation notifications. Adding or | 505 // Add and remove observers for page navigation notifications. Adding or |
503 // removing multiple times has no effect. The order in which notifications | 506 // removing multiple times has no effect. The order in which notifications |
504 // are sent to observers is undefined. Clients must be sure to remove the | 507 // are sent to observers is undefined. Clients must be sure to remove the |
505 // observer before they go away. | 508 // observer before they go away. |
506 void AddObserver(TabContentsObserver* observer); | 509 void AddObserver(TabContentsObserver* observer); |
507 void RemoveObserver(TabContentsObserver* observer); | 510 void RemoveObserver(TabContentsObserver* observer); |
508 | 511 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
858 ObserverList<TabContentsObserver> observers_; | 861 ObserverList<TabContentsObserver> observers_; |
859 | 862 |
860 // Content restrictions, used to disable print/copy etc based on content's | 863 // Content restrictions, used to disable print/copy etc based on content's |
861 // (full-page plugins for now only) permissions. | 864 // (full-page plugins for now only) permissions. |
862 int content_restrictions_; | 865 int content_restrictions_; |
863 | 866 |
864 DISALLOW_COPY_AND_ASSIGN(TabContents); | 867 DISALLOW_COPY_AND_ASSIGN(TabContents); |
865 }; | 868 }; |
866 | 869 |
867 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 870 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |