| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 static NativeConstrainedWindow* CreateNativeConstrainedWindow( | 44 static NativeConstrainedWindow* CreateNativeConstrainedWindow( |
| 45 NativeConstrainedWindowDelegate* delegate); | 45 NativeConstrainedWindowDelegate* delegate); |
| 46 | 46 |
| 47 virtual views::NativeWidget* AsNativeWidget() = 0; | 47 virtual views::NativeWidget* AsNativeWidget() = 0; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 /////////////////////////////////////////////////////////////////////////////// | 50 /////////////////////////////////////////////////////////////////////////////// |
| 51 // ConstrainedWindowViews | 51 // ConstrainedWindowViews |
| 52 // | 52 // |
| 53 // A ConstrainedWindow implementation that implements a Constrained Window as | 53 // A ConstrainedWindow implementation that implements a Constrained Window as |
| 54 // a child HWND with a custom window frame. | 54 // a child HWND with a custom window frame. The ConstrainedWindowViews owns |
| 55 // itself and will be deleted soon after being closed. |
| 55 // | 56 // |
| 56 class ConstrainedWindowViews : public views::Widget, | 57 class ConstrainedWindowViews : public views::Widget, |
| 57 public ConstrainedWindow, | 58 public ConstrainedWindow, |
| 58 public NativeConstrainedWindowDelegate { | 59 public NativeConstrainedWindowDelegate { |
| 59 public: | 60 public: |
| 60 ConstrainedWindowViews(TabContents* tab_contents, | 61 ConstrainedWindowViews(TabContents* tab_contents, |
| 61 views::WidgetDelegate* widget_delegate); | 62 views::WidgetDelegate* widget_delegate); |
| 62 virtual ~ConstrainedWindowViews(); | 63 virtual ~ConstrainedWindowViews(); |
| 63 | 64 |
| 64 // Returns the TabContents that constrains this Constrained Window. | 65 // Returns the TabContents that constrains this Constrained Window. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 82 virtual int GetNonClientComponent(const gfx::Point& point) OVERRIDE; | 83 virtual int GetNonClientComponent(const gfx::Point& point) OVERRIDE; |
| 83 | 84 |
| 84 TabContents* tab_contents_; | 85 TabContents* tab_contents_; |
| 85 | 86 |
| 86 NativeConstrainedWindow* native_constrained_window_; | 87 NativeConstrainedWindow* native_constrained_window_; |
| 87 | 88 |
| 88 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViews); | 89 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViews); |
| 89 }; | 90 }; |
| 90 | 91 |
| 91 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ | 92 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ |
| OLD | NEW |