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 26 matching lines...) Expand all Loading... |
37 #endif | 37 #endif |
38 | 38 |
39 namespace gfx { | 39 namespace gfx { |
40 class Rect; | 40 class Rect; |
41 } | 41 } |
42 | 42 |
43 namespace history { | 43 namespace history { |
44 class HistoryAddPageArgs; | 44 class HistoryAddPageArgs; |
45 } | 45 } |
46 | 46 |
47 class WebUI; | |
48 class DownloadItem; | |
49 class Extension; | 47 class Extension; |
50 class InfoBarDelegate; | 48 class InfoBarDelegate; |
51 class LoadNotificationDetails; | 49 class LoadNotificationDetails; |
52 class PluginObserver; | 50 class PluginObserver; |
53 class Profile; | 51 class Profile; |
| 52 struct RendererPreferences; |
54 class RenderViewHost; | 53 class RenderViewHost; |
55 class SessionStorageNamespace; | 54 class SessionStorageNamespace; |
56 class SiteInstance; | 55 class SiteInstance; |
57 class SkBitmap; | 56 class SkBitmap; |
58 class TabContentsDelegate; | 57 class TabContentsDelegate; |
59 class TabContentsObserver; | 58 class TabContentsObserver; |
60 class TabContentsSSLHelper; | 59 class TabContentsSSLHelper; |
61 class TabContentsView; | 60 class TabContentsView; |
62 class TabSpecificContentSettings; | 61 class TabSpecificContentSettings; |
| 62 struct ThumbnailScore; |
63 class URLPattern; | 63 class URLPattern; |
64 struct RendererPreferences; | |
65 struct ThumbnailScore; | |
66 struct ViewHostMsg_FrameNavigate_Params; | 64 struct ViewHostMsg_FrameNavigate_Params; |
67 struct WebPreferences; | 65 struct WebPreferences; |
| 66 class WebUI; |
68 | 67 |
69 // Describes what goes in the main content area of a tab. TabContents is | 68 // Describes what goes in the main content area of a tab. TabContents is |
70 // the only type of TabContents, and these should be merged together. | 69 // the only type of TabContents, and these should be merged together. |
71 class TabContents : public PageNavigator, | 70 class TabContents : public PageNavigator, |
72 public NotificationObserver, | 71 public NotificationObserver, |
73 public RenderViewHostDelegate, | 72 public RenderViewHostDelegate, |
74 public RenderViewHostManager::Delegate, | 73 public RenderViewHostManager::Delegate, |
75 public JavaScriptAppModalDialogDelegate, | 74 public JavaScriptAppModalDialogDelegate, |
76 public net::NetworkChangeNotifier::OnlineStateObserver { | 75 public net::NetworkChangeNotifier::OnlineStateObserver { |
77 public: | 76 public: |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 // WARNING: This does not sanity-check |index|! | 382 // WARNING: This does not sanity-check |index|! |
384 InfoBarDelegate* GetInfoBarDelegateAt(size_t index) { | 383 InfoBarDelegate* GetInfoBarDelegateAt(size_t index) { |
385 return infobar_delegates_[index]; | 384 return infobar_delegates_[index]; |
386 } | 385 } |
387 | 386 |
388 // Toolbars and such --------------------------------------------------------- | 387 // Toolbars and such --------------------------------------------------------- |
389 | 388 |
390 // Returns true if a Bookmark Bar should be shown for this tab. | 389 // Returns true if a Bookmark Bar should be shown for this tab. |
391 virtual bool ShouldShowBookmarkBar(); | 390 virtual bool ShouldShowBookmarkBar(); |
392 | 391 |
393 // Notifies the delegate that a download is about to be started. | |
394 // This notification is fired before a local temporary file has been created. | |
395 bool CanDownload(int request_id); | |
396 | |
397 // Notifies the delegate that a download started. | |
398 void OnStartDownload(DownloadItem* download); | |
399 | |
400 // Called when a ConstrainedWindow we own is about to be closed. | 392 // Called when a ConstrainedWindow we own is about to be closed. |
401 void WillClose(ConstrainedWindow* window); | 393 void WillClose(ConstrainedWindow* window); |
402 | 394 |
403 // Interstitials ------------------------------------------------------------- | 395 // Interstitials ------------------------------------------------------------- |
404 | 396 |
405 // Various other systems need to know about our interstitials. | 397 // Various other systems need to know about our interstitials. |
406 bool showing_interstitial_page() const { | 398 bool showing_interstitial_page() const { |
407 return render_manager_.interstitial_page() != NULL; | 399 return render_manager_.interstitial_page() != NULL; |
408 } | 400 } |
409 | 401 |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 ObserverList<TabContentsObserver> observers_; | 977 ObserverList<TabContentsObserver> observers_; |
986 | 978 |
987 // Content restrictions, used to disable print/copy etc based on content's | 979 // Content restrictions, used to disable print/copy etc based on content's |
988 // (full-page plugins for now only) permissions. | 980 // (full-page plugins for now only) permissions. |
989 int content_restrictions_; | 981 int content_restrictions_; |
990 | 982 |
991 DISALLOW_COPY_AND_ASSIGN(TabContents); | 983 DISALLOW_COPY_AND_ASSIGN(TabContents); |
992 }; | 984 }; |
993 | 985 |
994 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ | 986 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_H_ |
OLD | NEW |