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 13 matching lines...) Expand all Loading... |
24 class Point; | 24 class Point; |
25 class Rect; | 25 class Rect; |
26 class Size; | 26 class Size; |
27 } | 27 } |
28 | 28 |
29 namespace history { | 29 namespace history { |
30 class HistoryAddPageArgs; | 30 class HistoryAddPageArgs; |
31 } | 31 } |
32 | 32 |
33 struct ContextMenuParams; | 33 struct ContextMenuParams; |
| 34 class DownloadItem; |
34 class GURL; | 35 class GURL; |
35 class HtmlDialogUIDelegate; | 36 class HtmlDialogUIDelegate; |
36 struct NativeWebKeyboardEvent; | 37 struct NativeWebKeyboardEvent; |
37 class Profile; | 38 class Profile; |
38 class RenderViewHost; | 39 class RenderViewHost; |
39 class TabContents; | 40 class TabContents; |
40 | 41 |
41 // Objects implement this interface to get notified about changes in the | 42 // Objects implement this interface to get notified about changes in the |
42 // TabContents and to provide necessary functionality. | 43 // TabContents and to provide necessary functionality. |
43 class TabContentsDelegate { | 44 class TabContentsDelegate { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 184 |
184 // Changes the blocked state of the tab at |index|. TabContents are | 185 // Changes the blocked state of the tab at |index|. TabContents are |
185 // considered blocked while displaying a tab modal dialog. During that time | 186 // considered blocked while displaying a tab modal dialog. During that time |
186 // renderer host will ignore any UI interaction within TabContent outside of | 187 // renderer host will ignore any UI interaction within TabContent outside of |
187 // the currently displaying dialog. | 188 // the currently displaying dialog. |
188 virtual void SetTabContentBlocked(TabContents* contents, bool blocked); | 189 virtual void SetTabContentBlocked(TabContents* contents, bool blocked); |
189 | 190 |
190 // Notification that |tab_contents| has gained focus. | 191 // Notification that |tab_contents| has gained focus. |
191 virtual void TabContentsFocused(TabContents* tab_content); | 192 virtual void TabContentsFocused(TabContents* tab_content); |
192 | 193 |
| 194 virtual bool CanDownload(int request_id); |
| 195 |
| 196 virtual void OnStartDownload(DownloadItem* download, TabContents* tab); |
| 197 |
193 // Return much extra vertical space should be allotted to the | 198 // Return much extra vertical space should be allotted to the |
194 // render view widget during various animations (e.g. infobar closing). | 199 // render view widget during various animations (e.g. infobar closing). |
195 // This is used to make painting look smoother. | 200 // This is used to make painting look smoother. |
196 virtual int GetExtraRenderViewHeight() const; | 201 virtual int GetExtraRenderViewHeight() const; |
197 | 202 |
198 // Returns true if the context menu operation was handled by the delegate. | 203 // Returns true if the context menu operation was handled by the delegate. |
199 virtual bool HandleContextMenu(const ContextMenuParams& params); | 204 virtual bool HandleContextMenu(const ContextMenuParams& params); |
200 | 205 |
201 // Returns true if the context menu command was handled | 206 // Returns true if the context menu command was handled |
202 virtual bool ExecuteContextMenuCommand(int command); | 207 virtual bool ExecuteContextMenuCommand(int command); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 void Attach(TabContents* source); | 297 void Attach(TabContents* source); |
293 | 298 |
294 // Called when |this| is no longer the TabContentsDelegate for |source|. | 299 // Called when |this| is no longer the TabContentsDelegate for |source|. |
295 void Detach(TabContents* source); | 300 void Detach(TabContents* source); |
296 | 301 |
297 // The TabContents that this is currently a delegate for. | 302 // The TabContents that this is currently a delegate for. |
298 std::set<TabContents*> attached_contents_; | 303 std::set<TabContents*> attached_contents_; |
299 }; | 304 }; |
300 | 305 |
301 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 306 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
OLD | NEW |