| 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 #include <vector> | 10 #include <vector> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Point; | 22 class Point; |
| 23 class Rect; | 23 class Rect; |
| 24 class Size; | 24 class Size; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace history { | 27 namespace history { |
| 28 class HistoryAddPageArgs; | 28 class HistoryAddPageArgs; |
| 29 } | 29 } |
| 30 | 30 |
| 31 struct ContextMenuParams; |
| 31 class DownloadItem; | 32 class DownloadItem; |
| 32 class ExtensionFunctionDispatcher; | 33 class ExtensionFunctionDispatcher; |
| 33 class GURL; | 34 class GURL; |
| 34 class HtmlDialogUIDelegate; | 35 class HtmlDialogUIDelegate; |
| 35 struct NativeWebKeyboardEvent; | 36 struct NativeWebKeyboardEvent; |
| 36 class Profile; | 37 class Profile; |
| 37 class RenderViewHost; | 38 class RenderViewHost; |
| 38 class TabContents; | 39 class TabContents; |
| 39 class TemplateURL; | 40 class TemplateURL; |
| 40 class TemplateURLModel; | 41 class TemplateURLModel; |
| 41 struct ContextMenuParams; | |
| 42 | 42 |
| 43 // Objects implement this interface to get notified about changes in the | 43 // Objects implement this interface to get notified about changes in the |
| 44 // TabContents and to provide necessary functionality. | 44 // TabContents and to provide necessary functionality. |
| 45 class TabContentsDelegate : public AutomationResourceRoutingDelegate { | 45 class TabContentsDelegate : public AutomationResourceRoutingDelegate { |
| 46 public: | 46 public: |
| 47 // Opens a new URL inside the passed in TabContents (if source is 0 open | 47 // Opens a new URL inside the passed in TabContents (if source is 0 open |
| 48 // in the current front-most tab), unless |disposition| indicates the url | 48 // in the current front-most tab), unless |disposition| indicates the url |
| 49 // should be opened in a new tab or window. | 49 // should be opened in a new tab or window. |
| 50 // | 50 // |
| 51 // A NULL source indicates the current tab (callers should probably use | 51 // A NULL source indicates the current tab (callers should probably use |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 // Allows delegate to override navigation to the history entries. | 274 // Allows delegate to override navigation to the history entries. |
| 275 // Returns true to allow TabContents to continue with the default processing. | 275 // Returns true to allow TabContents to continue with the default processing. |
| 276 virtual bool OnGoToEntryOffset(int offset); | 276 virtual bool OnGoToEntryOffset(int offset); |
| 277 | 277 |
| 278 // Returns whether this tab contents should add the specified navigation to | 278 // Returns whether this tab contents should add the specified navigation to |
| 279 // history. | 279 // history. |
| 280 virtual bool ShouldAddNavigationToHistory( | 280 virtual bool ShouldAddNavigationToHistory( |
| 281 const history::HistoryAddPageArgs& add_page_args, | 281 const history::HistoryAddPageArgs& add_page_args, |
| 282 NavigationType::Type navigation_type); | 282 NavigationType::Type navigation_type); |
| 283 | 283 |
| 284 // Notification when web app info data is available | 284 // Notification that a user's request to install an application has completed. |
| 285 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, | 285 virtual void OnDidGetApplicationInfo(TabContents* tab_contents, |
| 286 int32 page_id); | 286 int32 page_id); |
| 287 | 287 |
| 288 // Returns the native window framing the view containing the tab contents. | 288 // Returns the native window framing the view containing the tab contents. |
| 289 virtual gfx::NativeWindow GetFrameNativeWindow(); | 289 virtual gfx::NativeWindow GetFrameNativeWindow(); |
| 290 | 290 |
| 291 // Notifies the delegate about the creation of a new TabContents. This | 291 // Notifies the delegate about the creation of a new TabContents. This |
| 292 // typically happens when popups are created. | 292 // typically happens when popups are created. |
| 293 virtual void TabContentsCreated(TabContents* new_contents); | 293 virtual void TabContentsCreated(TabContents* new_contents); |
| 294 | 294 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 314 | 314 |
| 315 // Notifies the delegate that the content restrictions for this tab has | 315 // Notifies the delegate that the content restrictions for this tab has |
| 316 // changed. | 316 // changed. |
| 317 virtual void ContentRestrictionsChanged(TabContents* source); | 317 virtual void ContentRestrictionsChanged(TabContents* source); |
| 318 | 318 |
| 319 protected: | 319 protected: |
| 320 virtual ~TabContentsDelegate(); | 320 virtual ~TabContentsDelegate(); |
| 321 }; | 321 }; |
| 322 | 322 |
| 323 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 323 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |