| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 virtual void OnContentSettingsChange(TabContents* source) { } | 120 virtual void OnContentSettingsChange(TabContents* source) { } |
| 121 | 121 |
| 122 // Check whether this contents is inside a window dedicated to running a web | 122 // Check whether this contents is inside a window dedicated to running a web |
| 123 // application. | 123 // application. |
| 124 virtual bool IsApplication() const { return false; } | 124 virtual bool IsApplication() const { return false; } |
| 125 | 125 |
| 126 // Detach the given tab and convert it to a "webapp" view. The tab must be | 126 // Detach the given tab and convert it to a "webapp" view. The tab must be |
| 127 // a TabContents with a valid WebApp set. | 127 // a TabContents with a valid WebApp set. |
| 128 virtual void ConvertContentsToApplication(TabContents* source) { } | 128 virtual void ConvertContentsToApplication(TabContents* source) { } |
| 129 | 129 |
| 130 // Whether this tab can be blurred through a javascript obj.blur() | |
| 131 // call. ConstrainedWindows shouldn't be able to be blurred. | |
| 132 virtual bool CanBlur() const { return true; } | |
| 133 | |
| 134 // Whether the specified tab can be reloaded. | 130 // Whether the specified tab can be reloaded. |
| 135 // Reloading can be disabled e. g. for the DevTools window. | 131 // Reloading can be disabled e. g. for the DevTools window. |
| 136 virtual bool CanReloadContents(TabContents* source) const { return true; } | 132 virtual bool CanReloadContents(TabContents* source) const { return true; } |
| 137 | 133 |
| 138 // Return the rect where to display the resize corner, if any, otherwise | 134 // Return the rect where to display the resize corner, if any, otherwise |
| 139 // an empty rect. | 135 // an empty rect. |
| 140 virtual gfx::Rect GetRootWindowResizerRect() const { return gfx::Rect(); } | 136 virtual gfx::Rect GetRootWindowResizerRect() const { return gfx::Rect(); } |
| 141 | 137 |
| 142 // Show a dialog with HTML content. |delegate| contains a pointer to the | 138 // Show a dialog with HTML content. |delegate| contains a pointer to the |
| 143 // delegate who knows how to display the dialog (which file URL and JSON | 139 // delegate who knows how to display the dialog (which file URL and JSON |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 | 290 |
| 295 // Notification that the preferred size of the contents has changed. | 291 // Notification that the preferred size of the contents has changed. |
| 296 // Only called if ShouldEnablePreferredSizeNotifications() returns true. | 292 // Only called if ShouldEnablePreferredSizeNotifications() returns true. |
| 297 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} | 293 virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} |
| 298 | 294 |
| 299 protected: | 295 protected: |
| 300 ~TabContentsDelegate() {} | 296 ~TabContentsDelegate() {} |
| 301 }; | 297 }; |
| 302 | 298 |
| 303 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ | 299 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |