OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "chrome/browser/automation/automation_resource_routing_delegate.h" | 12 #include "chrome/browser/automation/automation_resource_routing_delegate.h" |
13 #include "chrome/browser/tab_contents/navigation_entry.h" | 13 #include "chrome/browser/tab_contents/navigation_entry.h" |
14 #include "chrome/common/content_settings_types.h" | 14 #include "chrome/common/content_settings_types.h" |
15 #include "chrome/common/native_web_keyboard_event.h" | 15 #include "chrome/common/native_web_keyboard_event.h" |
16 #include "chrome/common/page_transition_types.h" | 16 #include "chrome/common/page_transition_types.h" |
17 #include "gfx/native_widget_types.h" | 17 #include "gfx/native_widget_types.h" |
18 #include "gfx/rect.h" | 18 #include "gfx/rect.h" |
19 #include "webkit/glue/context_menu.h" | 19 #include "webkit/glue/context_menu.h" |
20 #include "webkit/glue/window_open_disposition.h" | 20 #include "webkit/glue/window_open_disposition.h" |
21 | 21 |
| 22 class Browser; |
22 class DownloadItem; | 23 class DownloadItem; |
23 class ExtensionFunctionDispatcher; | 24 class ExtensionFunctionDispatcher; |
24 class GURL; | 25 class GURL; |
25 class HtmlDialogUIDelegate; | 26 class HtmlDialogUIDelegate; |
26 class Profile; | 27 class Profile; |
27 class RenderViewHost; | 28 class RenderViewHost; |
28 class TabContents; | 29 class TabContents; |
29 class TemplateURL; | 30 class TemplateURL; |
30 | 31 |
31 namespace webkit_glue { | 32 namespace webkit_glue { |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 // Returns true to allow TabContents to continue with the default processing. | 241 // Returns true to allow TabContents to continue with the default processing. |
241 virtual bool OnGoToEntryOffset(int offset); | 242 virtual bool OnGoToEntryOffset(int offset); |
242 | 243 |
243 // Returns whether this tab contents should add navigations to history. | 244 // Returns whether this tab contents should add navigations to history. |
244 virtual bool ShouldAddNavigationsToHistory() const; | 245 virtual bool ShouldAddNavigationsToHistory() const; |
245 | 246 |
246 // Notification when web app info data is available | 247 // Notification when web app info data is available |
247 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, | 248 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, |
248 int32 page_id); | 249 int32 page_id); |
249 | 250 |
| 251 // Returns the browser in which the tab contents is being displayed. |
| 252 virtual Browser* GetBrowser(); |
| 253 |
250 // Returns the native window framing the view containing the tab contents. | 254 // Returns the native window framing the view containing the tab contents. |
251 virtual gfx::NativeWindow GetFrameNativeWindow(); | 255 virtual gfx::NativeWindow GetFrameNativeWindow(); |
252 | 256 |
253 // Notifies the delegate about the creation of a new TabContents. This | 257 // Notifies the delegate about the creation of a new TabContents. This |
254 // typically happens when popups are created. | 258 // typically happens when popups are created. |
255 virtual void TabContentsCreated(TabContents* new_contents); | 259 virtual void TabContentsCreated(TabContents* new_contents); |
256 | 260 |
257 // Returns whether infobars are enabled. Overrideable by child classes. | 261 // Returns whether infobars are enabled. Overrideable by child classes. |
258 virtual bool infobars_enabled(); | 262 virtual bool infobars_enabled(); |
259 | 263 |
(...skipping 10 matching lines...) Expand all Loading... |
270 // Notifies the delegate that something has changed about what content the | 274 // Notifies the delegate that something has changed about what content the |
271 // TabContents is displaying. Currently this is only fired when displaying | 275 // TabContents is displaying. Currently this is only fired when displaying |
272 // PDF using the internal PDF plugin. | 276 // PDF using the internal PDF plugin. |
273 virtual void ContentTypeChanged(TabContents* source); | 277 virtual void ContentTypeChanged(TabContents* source); |
274 | 278 |
275 protected: | 279 protected: |
276 virtual ~TabContentsDelegate(); | 280 virtual ~TabContentsDelegate(); |
277 }; | 281 }; |
278 | 282 |
279 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 283 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
OLD | NEW |