| 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 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 // Causes the delegate to detach |source| and clean up any internal data | 103 // 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 | 104 // 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);". | 105 // caller, and it is safe to call "source->set_delegate(someone_else);". |
| 106 virtual void DetachContents(TabContents* source); | 106 virtual void DetachContents(TabContents* source); |
| 107 | 107 |
| 108 // Called to determine if the TabContents is contained in a popup window. | 108 // Called to determine if the TabContents is contained in a popup window. |
| 109 virtual bool IsPopup(const TabContents* source) const; | 109 virtual bool IsPopup(const TabContents* source) const; |
| 110 | 110 |
| 111 // If |source| is constrained, returns the tab containing it. Otherwise | 111 // If |source| is constrained, returns the tab containing it. Otherwise |
| 112 // returns |source|. | 112 // returns |source|. TODO(avi): Remove in favor of GetConstrainingContents on |
| 113 // ContentSettingsTabHelperDelegate once uses of it in TabContents are |
| 114 // removed. |
| 113 virtual TabContents* GetConstrainingContents(TabContents* source); | 115 virtual TabContents* GetConstrainingContents(TabContents* source); |
| 114 | 116 |
| 115 // Returns true if constrained windows should be focused. Default is true. | 117 // Returns true if constrained windows should be focused. Default is true. |
| 116 virtual bool ShouldFocusConstrainedWindow(); | 118 virtual bool ShouldFocusConstrainedWindow(); |
| 117 | 119 |
| 118 // Invoked prior to the TabContents showing a constrained window. | 120 // Invoked prior to the TabContents showing a constrained window. |
| 119 virtual void WillShowConstrainedWindow(TabContents* source); | 121 virtual void WillShowConstrainedWindow(TabContents* source); |
| 120 | 122 |
| 121 // Notification that the target URL has changed. | 123 // Notification that the target URL has changed. |
| 122 virtual void UpdateTargetURL(TabContents* source, const GURL& url) = 0; | 124 virtual void UpdateTargetURL(TabContents* source, const GURL& url) = 0; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 virtual bool ShouldShowHungRendererDialog(); | 309 virtual bool ShouldShowHungRendererDialog(); |
| 308 | 310 |
| 309 // Notification that a worker associated with this tab has crashed. | 311 // Notification that a worker associated with this tab has crashed. |
| 310 virtual void WorkerCrashed(); | 312 virtual void WorkerCrashed(); |
| 311 | 313 |
| 312 protected: | 314 protected: |
| 313 virtual ~TabContentsDelegate(); | 315 virtual ~TabContentsDelegate(); |
| 314 }; | 316 }; |
| 315 | 317 |
| 316 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 318 #endif // CONTENT_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |