| 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 CHROME_BROWSER_UI_CONSTRAINED_WINDOW_TAB_HELPER_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_CONSTRAINED_WINDOW_TAB_HELPER_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_CONSTRAINED_WINDOW_TAB_HELPER_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_CONSTRAINED_WINDOW_TAB_HELPER_DELEGATE_H_ |
| 7 | 7 |
| 8 namespace content { | 8 namespace content { |
| 9 class WebContents; | 9 class WebContents; |
| 10 } | 10 } |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 class Point; | 13 class Point; |
| 14 } | 14 } |
| 15 | 15 |
| 16 class ConstrainedWindowTabHelperDelegate { | 16 class ConstrainedWindowTabHelperDelegate { |
| 17 public: | 17 public: |
| 18 // Returns true if constrained windows should be focused. Default is true. | 18 // Returns true if constrained windows should be focused. Default is true. |
| 19 virtual bool ShouldFocusConstrainedWindow(); | 19 virtual bool ShouldFocusConstrainedWindow(); |
| 20 | 20 |
| 21 // Changes the blocked state of |web_contents|. WebContentses are considered | 21 // Changes the blocked state of |web_contents|. WebContentses are considered |
| 22 // blocked while displaying a tab modal dialog. During that time renderer host | 22 // blocked while displaying a tab modal dialog. During that time renderer host |
| 23 // will ignore any UI interaction within WebContents outside of the | 23 // will ignore any UI interaction within WebContents outside of the |
| 24 // currently displaying dialog. | 24 // currently displaying dialog. |
| 25 virtual void SetTabContentBlocked(content::WebContents* web_contents, | 25 virtual void SetWebContentsBlocked(content::WebContents* web_contents, |
| 26 bool blocked); | 26 bool blocked); |
| 27 | 27 |
| 28 // Fills in |point| with the coordinates for positioning chrome style | 28 // Fills in |point| with the coordinates for positioning chrome style |
| 29 // constrained windows. The constrained window should position itself such | 29 // constrained windows. The constrained window should position itself such |
| 30 // that its top center is at |point|. Return false if the default position | 30 // that its top center is at |point|. Return false if the default position |
| 31 // should be used. | 31 // should be used. |
| 32 virtual bool GetConstrainedWindowTopCenter(gfx::Point* point); | 32 virtual bool GetDialogTopCenter(gfx::Point* point); |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 virtual ~ConstrainedWindowTabHelperDelegate(); | 35 virtual ~ConstrainedWindowTabHelperDelegate(); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_TAB_HELPER_DELEGATE_H_ | 38 #endif // CHROME_BROWSER_UI_CONSTRAINED_WINDOW_TAB_HELPER_DELEGATE_H_ |
| OLD | NEW |