| 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 int content_restrictions() const { return content_restrictions_; } | 483 int content_restrictions() const { return content_restrictions_; } |
| 484 void SetContentRestrictions(int restrictions); | 484 void SetContentRestrictions(int restrictions); |
| 485 | 485 |
| 486 // Query the WebUIFactory for the TypeID for the current URL. | 486 // Query the WebUIFactory for the TypeID for the current URL. |
| 487 WebUI::TypeID GetWebUITypeForCurrentState(); | 487 WebUI::TypeID GetWebUITypeForCurrentState(); |
| 488 | 488 |
| 489 // Returns the WebUI for the current state of the tab. This will either be | 489 // Returns the WebUI for the current state of the tab. This will either be |
| 490 // the pending WebUI, the committed WebUI, or NULL. | 490 // the pending WebUI, the committed WebUI, or NULL. |
| 491 WebUI* GetWebUIForCurrentState(); | 491 WebUI* GetWebUIForCurrentState(); |
| 492 | 492 |
| 493 // Invoked when the preferred size of the contents has been changed. |
| 494 void UpdatePreferredSize(const gfx::Size& pref_size); |
| 495 |
| 493 protected: | 496 protected: |
| 494 friend class TabContentsObserver; | 497 friend class TabContentsObserver; |
| 495 | 498 |
| 496 // Add and remove observers for page navigation notifications. Adding or | 499 // Add and remove observers for page navigation notifications. Adding or |
| 497 // removing multiple times has no effect. The order in which notifications | 500 // removing multiple times has no effect. The order in which notifications |
| 498 // are sent to observers is undefined. Clients must be sure to remove the | 501 // are sent to observers is undefined. Clients must be sure to remove the |
| 499 // observer before they go away. | 502 // observer before they go away. |
| 500 void AddObserver(TabContentsObserver* observer); | 503 void AddObserver(TabContentsObserver* observer); |
| 501 void RemoveObserver(TabContentsObserver* observer); | 504 void RemoveObserver(TabContentsObserver* observer); |
| 502 | 505 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 ObserverList<TabContentsObserver> observers_; | 852 ObserverList<TabContentsObserver> observers_; |
| 850 | 853 |
| 851 // Content restrictions, used to disable print/copy etc based on content's | 854 // Content restrictions, used to disable print/copy etc based on content's |
| 852 // (full-page plugins for now only) permissions. | 855 // (full-page plugins for now only) permissions. |
| 853 int content_restrictions_; | 856 int content_restrictions_; |
| 854 | 857 |
| 855 DISALLOW_COPY_AND_ASSIGN(TabContents); | 858 DISALLOW_COPY_AND_ASSIGN(TabContents); |
| 856 }; | 859 }; |
| 857 | 860 |
| 858 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 861 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
| OLD | NEW |