| 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_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "chrome/browser/ui/constrained_window.h" | 9 #include "chrome/browser/ui/constrained_window.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 public NativeConstrainedWindowDelegate { | 60 public NativeConstrainedWindowDelegate { |
| 61 public: | 61 public: |
| 62 ConstrainedWindowViews(content::WebContents* web_contents, | 62 ConstrainedWindowViews(content::WebContents* web_contents, |
| 63 views::WidgetDelegate* widget_delegate); | 63 views::WidgetDelegate* widget_delegate); |
| 64 virtual ~ConstrainedWindowViews(); | 64 virtual ~ConstrainedWindowViews(); |
| 65 | 65 |
| 66 // Returns the WebContents that constrains this Constrained Window. | 66 // Returns the WebContents that constrains this Constrained Window. |
| 67 content::WebContents* owner() const { return web_contents_; } | 67 content::WebContents* owner() const { return web_contents_; } |
| 68 | 68 |
| 69 // Overridden from ConstrainedWindow: | 69 // Overridden from ConstrainedWindow: |
| 70 virtual void ShowConstrainedWindow() OVERRIDE; | 70 virtual void ShowWebContentsModalDialog() OVERRIDE; |
| 71 virtual void CloseConstrainedWindow() OVERRIDE; | 71 virtual void CloseWebContentsModalDialog() OVERRIDE; |
| 72 virtual void FocusConstrainedWindow() OVERRIDE; | 72 virtual void FocusWebContentsModalDialog() OVERRIDE; |
| 73 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; | 73 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; |
| 74 | 74 |
| 75 // Default insets for the dialog: | 75 // Default insets for the dialog: |
| 76 static gfx::Insets GetDefaultInsets(); | 76 static gfx::Insets GetDefaultInsets(); |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 void NotifyTabHelperWillClose(); | 79 void NotifyTabHelperWillClose(); |
| 80 | 80 |
| 81 // Overridden from views::Widget: | 81 // Overridden from views::Widget: |
| 82 virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE; | 82 virtual views::NonClientFrameView* CreateNonClientFrameView() OVERRIDE; |
| 83 | 83 |
| 84 // Overridden from NativeConstrainedWindowDelegate: | 84 // Overridden from NativeConstrainedWindowDelegate: |
| 85 virtual void OnNativeConstrainedWindowDestroyed() OVERRIDE; | 85 virtual void OnNativeConstrainedWindowDestroyed() OVERRIDE; |
| 86 virtual void OnNativeConstrainedWindowMouseActivate() OVERRIDE; | 86 virtual void OnNativeConstrainedWindowMouseActivate() OVERRIDE; |
| 87 virtual views::internal::NativeWidgetDelegate* | 87 virtual views::internal::NativeWidgetDelegate* |
| 88 AsNativeWidgetDelegate() OVERRIDE; | 88 AsNativeWidgetDelegate() OVERRIDE; |
| 89 virtual int GetNonClientComponent(const gfx::Point& point) OVERRIDE; | 89 virtual int GetNonClientComponent(const gfx::Point& point) OVERRIDE; |
| 90 | 90 |
| 91 content::WebContents* web_contents_; | 91 content::WebContents* web_contents_; |
| 92 | 92 |
| 93 NativeConstrainedWindow* native_constrained_window_; | 93 NativeConstrainedWindow* native_constrained_window_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViews); | 95 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViews); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ | 98 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ |
| OLD | NEW |