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