| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 virtual bool IsApplication() const; | 155 virtual bool IsApplication() const; |
| 156 | 156 |
| 157 // Detach the given tab and convert it to a "webapp" view. The tab must be | 157 // Detach the given tab and convert it to a "webapp" view. The tab must be |
| 158 // a WebContents with a valid WebApp set. | 158 // a WebContents with a valid WebApp set. |
| 159 virtual void ConvertContentsToApplication(WebContents* source) {} | 159 virtual void ConvertContentsToApplication(WebContents* source) {} |
| 160 | 160 |
| 161 // Whether the specified tab can be reloaded. | 161 // Whether the specified tab can be reloaded. |
| 162 // Reloading can be disabled e. g. for the DevTools window. | 162 // Reloading can be disabled e. g. for the DevTools window. |
| 163 virtual bool CanReloadContents(WebContents* source) const; | 163 virtual bool CanReloadContents(WebContents* source) const; |
| 164 | 164 |
| 165 // Return the rect where to display the resize corner, if any, otherwise |
| 166 // an empty rect. |
| 167 virtual gfx::Rect GetRootWindowResizerRect() const; |
| 168 |
| 165 // Invoked prior to showing before unload handler confirmation dialog. | 169 // Invoked prior to showing before unload handler confirmation dialog. |
| 166 virtual void WillRunBeforeUnloadConfirm() {} | 170 virtual void WillRunBeforeUnloadConfirm() {} |
| 167 | 171 |
| 168 // Returns true if javascript dialogs and unload alerts are suppressed. | 172 // Returns true if javascript dialogs and unload alerts are suppressed. |
| 169 // Default is false. | 173 // Default is false. |
| 170 virtual bool ShouldSuppressDialogs(); | 174 virtual bool ShouldSuppressDialogs(); |
| 171 | 175 |
| 172 // Tells us that we've finished firing this tab's beforeunload event. | 176 // Tells us that we've finished firing this tab's beforeunload event. |
| 173 // The proceed bool tells us whether the user chose to proceed closing the | 177 // The proceed bool tells us whether the user chose to proceed closing the |
| 174 // tab. Returns true if the tab can continue on firing it's unload event. | 178 // tab. Returns true if the tab can continue on firing it's unload event. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // Called when |this| is no longer the WebContentsDelegate for |source|. | 398 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 395 void Detach(WebContents* source); | 399 void Detach(WebContents* source); |
| 396 | 400 |
| 397 // The WebContents that this is currently a delegate for. | 401 // The WebContents that this is currently a delegate for. |
| 398 std::set<WebContents*> attached_contents_; | 402 std::set<WebContents*> attached_contents_; |
| 399 }; | 403 }; |
| 400 | 404 |
| 401 } // namespace content | 405 } // namespace content |
| 402 | 406 |
| 403 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 407 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |