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> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "content/browser/tab_contents/navigation_entry.h" | 13 #include "content/browser/tab_contents/navigation_entry.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/browser/navigation_types.h" | 15 #include "content/public/browser/navigation_types.h" |
16 #include "content/public/common/page_transition_types.h" | 16 #include "content/public/common/page_transition_types.h" |
17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
18 #include "webkit/glue/window_open_disposition.h" | 18 #include "webkit/glue/window_open_disposition.h" |
19 | 19 |
20 class DownloadItem; | 20 class DownloadItem; |
21 class FilePath; | 21 class FilePath; |
22 class GURL; | 22 class GURL; |
23 class TabContents; | 23 class TabContents; |
24 struct ContextMenuParams; | 24 struct ContextMenuParams; |
25 struct NativeWebKeyboardEvent; | 25 struct NativeWebKeyboardEvent; |
26 struct OpenURLParams; | 26 struct OpenURLParams; |
27 struct ViewHostMsg_RunFileChooser_Params; | |
28 | 27 |
29 namespace base { | 28 namespace base { |
30 class ListValue; | 29 class ListValue; |
31 } | 30 } |
32 | 31 |
33 namespace content { | 32 namespace content { |
34 class BrowserContext; | 33 class BrowserContext; |
| 34 struct FileChooserParams; |
35 class JavaScriptDialogCreator; | 35 class JavaScriptDialogCreator; |
36 } | 36 } |
37 | 37 |
38 namespace gfx { | 38 namespace gfx { |
39 class Point; | 39 class Point; |
40 class Rect; | 40 class Rect; |
41 class Size; | 41 class Size; |
42 } | 42 } |
43 | 43 |
44 namespace history { | 44 namespace history { |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // been committed. | 296 // been committed. |
297 virtual void DidNavigateToPendingEntry(TabContents* tab); | 297 virtual void DidNavigateToPendingEntry(TabContents* tab); |
298 | 298 |
299 // Returns a pointer to a service to create JavaScript dialogs. The default | 299 // Returns a pointer to a service to create JavaScript dialogs. The default |
300 // pointer returned is to a stub service that marks all dialogs as suppressed | 300 // pointer returned is to a stub service that marks all dialogs as suppressed |
301 // and displays nothing. | 301 // and displays nothing. |
302 virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator(); | 302 virtual content::JavaScriptDialogCreator* GetJavaScriptDialogCreator(); |
303 | 303 |
304 // Called when a file selection is to be done. | 304 // Called when a file selection is to be done. |
305 virtual void RunFileChooser(TabContents* tab, | 305 virtual void RunFileChooser(TabContents* tab, |
306 const ViewHostMsg_RunFileChooser_Params& params); | 306 const content::FileChooserParams& params); |
307 | 307 |
308 // Request to enumerate a directory. This is equivalent to running the file | 308 // Request to enumerate a directory. This is equivalent to running the file |
309 // chooser in directory-enumeration mode and having the user select the given | 309 // chooser in directory-enumeration mode and having the user select the given |
310 // directory. | 310 // directory. |
311 virtual void EnumerateDirectory(TabContents* tab, int request_id, | 311 virtual void EnumerateDirectory(TabContents* tab, int request_id, |
312 const FilePath& path); | 312 const FilePath& path); |
313 | 313 |
314 // Called when the renderer puts a tab into or out of fullscreen mode. | 314 // Called when the renderer puts a tab into or out of fullscreen mode. |
315 virtual void ToggleFullscreenModeForTab(TabContents* tab, | 315 virtual void ToggleFullscreenModeForTab(TabContents* tab, |
316 bool enter_fullscreen); | 316 bool enter_fullscreen); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 void Attach(TabContents* source); | 380 void Attach(TabContents* source); |
381 | 381 |
382 // Called when |this| is no longer the TabContentsDelegate for |source|. | 382 // Called when |this| is no longer the TabContentsDelegate for |source|. |
383 void Detach(TabContents* source); | 383 void Detach(TabContents* source); |
384 | 384 |
385 // The TabContents that this is currently a delegate for. | 385 // The TabContents that this is currently a delegate for. |
386 std::set<TabContents*> attached_contents_; | 386 std::set<TabContents*> attached_contents_; |
387 }; | 387 }; |
388 | 388 |
389 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 389 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
OLD | NEW |