| 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 <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/common/content_settings_types.h" | |
| 14 #include "chrome/common/instant_types.h" | 13 #include "chrome/common/instant_types.h" |
| 15 #include "content/browser/tab_contents/navigation_entry.h" | 14 #include "content/browser/tab_contents/navigation_entry.h" |
| 16 #include "content/common/navigation_types.h" | 15 #include "content/common/navigation_types.h" |
| 17 #include "content/common/page_transition_types.h" | 16 #include "content/common/page_transition_types.h" |
| 18 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 19 #include "webkit/glue/window_open_disposition.h" | 18 #include "webkit/glue/window_open_disposition.h" |
| 20 | 19 |
| 21 namespace gfx { | 20 namespace gfx { |
| 22 class Point; | 21 class Point; |
| 23 class Rect; | 22 class Rect; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 101 |
| 103 // Causes the delegate to detach |source| and clean up any internal data | 102 // Causes the delegate to detach |source| and clean up any internal data |
| 104 // pointing to it. After this call ownership of |source| passes to the | 103 // pointing to it. After this call ownership of |source| passes to the |
| 105 // caller, and it is safe to call "source->set_delegate(someone_else);". | 104 // caller, and it is safe to call "source->set_delegate(someone_else);". |
| 106 virtual void DetachContents(TabContents* source); | 105 virtual void DetachContents(TabContents* source); |
| 107 | 106 |
| 108 // Called to determine if the TabContents is contained in a popup window. | 107 // Called to determine if the TabContents is contained in a popup window. |
| 109 virtual bool IsPopup(const TabContents* source) const; | 108 virtual bool IsPopup(const TabContents* source) const; |
| 110 | 109 |
| 111 // If |source| is constrained, returns the tab containing it. Otherwise | 110 // If |source| is constrained, returns the tab containing it. Otherwise |
| 112 // returns |source|. | 111 // returns |source|. TODO(avi): Remove in favor of GetConstrainingContents on |
| 112 // ContentSettingsTabHelperDelegate once uses of it in TabContents are |
| 113 // removed. |
| 113 virtual TabContents* GetConstrainingContents(TabContents* source); | 114 virtual TabContents* GetConstrainingContents(TabContents* source); |
| 114 | 115 |
| 115 // Returns true if constrained windows should be focused. Default is true. | 116 // Returns true if constrained windows should be focused. Default is true. |
| 116 virtual bool ShouldFocusConstrainedWindow(); | 117 virtual bool ShouldFocusConstrainedWindow(); |
| 117 | 118 |
| 118 // Invoked prior to the TabContents showing a constrained window. | 119 // Invoked prior to the TabContents showing a constrained window. |
| 119 virtual void WillShowConstrainedWindow(TabContents* source); | 120 virtual void WillShowConstrainedWindow(TabContents* source); |
| 120 | 121 |
| 121 // Notification that some of our content has changed size as | 122 // Notification that some of our content has changed size as |
| 122 // part of an animation. | 123 // part of an animation. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 261 |
| 261 virtual void HandleMouseUp(); | 262 virtual void HandleMouseUp(); |
| 262 virtual void HandleMouseActivate(); | 263 virtual void HandleMouseActivate(); |
| 263 | 264 |
| 264 // Render view drag n drop ended. | 265 // Render view drag n drop ended. |
| 265 virtual void DragEnded(); | 266 virtual void DragEnded(); |
| 266 | 267 |
| 267 // Shows the repost form confirmation dialog box. | 268 // Shows the repost form confirmation dialog box. |
| 268 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents); | 269 virtual void ShowRepostFormWarningDialog(TabContents* tab_contents); |
| 269 | 270 |
| 270 // Shows the Content Settings page for a given content type. | |
| 271 virtual void ShowContentSettingsPage(ContentSettingsType content_type); | |
| 272 | |
| 273 // Shows the cookies collected in the tab contents. | |
| 274 virtual void ShowCollectedCookiesDialog(TabContents* tab_contents); | |
| 275 | |
| 276 // Allows delegate to override navigation to the history entries. | 271 // Allows delegate to override navigation to the history entries. |
| 277 // Returns true to allow TabContents to continue with the default processing. | 272 // Returns true to allow TabContents to continue with the default processing. |
| 278 virtual bool OnGoToEntryOffset(int offset); | 273 virtual bool OnGoToEntryOffset(int offset); |
| 279 | 274 |
| 280 // Returns whether this tab contents should add the specified navigation to | 275 // Returns whether this tab contents should add the specified navigation to |
| 281 // history. | 276 // history. |
| 282 virtual bool ShouldAddNavigationToHistory( | 277 virtual bool ShouldAddNavigationToHistory( |
| 283 const history::HistoryAddPageArgs& add_page_args, | 278 const history::HistoryAddPageArgs& add_page_args, |
| 284 NavigationType::Type navigation_type); | 279 NavigationType::Type navigation_type); |
| 285 | 280 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 311 virtual bool ShouldShowHungRendererDialog(); | 306 virtual bool ShouldShowHungRendererDialog(); |
| 312 | 307 |
| 313 // Notification that a worker associated with this tab has crashed. | 308 // Notification that a worker associated with this tab has crashed. |
| 314 virtual void WorkerCrashed(); | 309 virtual void WorkerCrashed(); |
| 315 | 310 |
| 316 protected: | 311 protected: |
| 317 virtual ~TabContentsDelegate(); | 312 virtual ~TabContentsDelegate(); |
| 318 }; | 313 }; |
| 319 | 314 |
| 320 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 315 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |