Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: chrome/browser/ui/views/ash/panel_view_aura.h

Issue 10795005: views: Inherit from views::WidgetDelegateView in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_ASH_PANEL_VIEW_AURA_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_ASH_PANEL_VIEW_AURA_H_
6 #define CHROME_BROWSER_UI_VIEWS_ASH_PANEL_VIEW_AURA_H_ 6 #define CHROME_BROWSER_UI_VIEWS_ASH_PANEL_VIEW_AURA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 namespace internal { 32 namespace internal {
33 class PanelHost; 33 class PanelHost;
34 } 34 }
35 35
36 /////////////////////////////////////////////////////////////////////////////// 36 ///////////////////////////////////////////////////////////////////////////////
37 // PanelViewAura is used to display HTML in a Panel window. 37 // PanelViewAura is used to display HTML in a Panel window.
38 // 38 //
39 class PanelViewAura : public views::NativeViewHost, 39 class PanelViewAura : public views::NativeViewHost,
40 public views::WidgetDelegate, 40 public views::WidgetDelegateView,
Ben Goodger (Google) 2012/07/23 21:17:55 This is wrong. If you do this, you'll end up subcl
41 public BaseWindow { 41 public BaseWindow {
42 public: 42 public:
43 explicit PanelViewAura(const std::string& title); 43 explicit PanelViewAura(const std::string& title);
44 virtual ~PanelViewAura(); 44 virtual ~PanelViewAura();
45 45
46 views::Widget* Init(Profile* profile, 46 views::Widget* Init(Profile* profile,
47 const GURL& url, 47 const GURL& url,
48 const gfx::Rect& bounds); 48 const gfx::Rect& bounds);
49 49
50 // Returns the WebContents associated with this panel. 50 // Returns the WebContents associated with this panel.
51 content::WebContents* WebContents(); 51 content::WebContents* WebContents();
52 52
53 // Close the panel window. 53 // Close the panel window.
54 void CloseView(); 54 void CloseView();
55 55
56 // Set the preferred size of the contents. 56 // Set the preferred size of the contents.
57 void SetContentPreferredSize(const gfx::Size& size); 57 void SetContentPreferredSize(const gfx::Size& size);
58 58
59 const SessionID& session_id() const { return session_id_; } 59 const SessionID& session_id() const { return session_id_; }
60 extensions::WindowController* extension_window_controller() const { 60 extensions::WindowController* extension_window_controller() const {
61 return extension_window_controller_.get(); 61 return extension_window_controller_.get();
62 } 62 }
63 63
64 // Overridden from views::View: 64 // Overridden from views::View:
65 virtual gfx::Size GetPreferredSize() OVERRIDE; 65 virtual gfx::Size GetPreferredSize() OVERRIDE;
66 66
67 // Overridden from views::WidgetDelegate: 67 // Overridden from views::WidgetDelegateView:
68 virtual bool CanResize() const OVERRIDE; 68 virtual bool CanResize() const OVERRIDE;
69 virtual string16 GetWindowTitle() const OVERRIDE; 69 virtual string16 GetWindowTitle() const OVERRIDE;
70 virtual views::View* GetContentsView() OVERRIDE; 70 virtual views::View* GetContentsView() OVERRIDE;
71 virtual views::View* GetInitiallyFocusedView() OVERRIDE; 71 virtual views::View* GetInitiallyFocusedView() OVERRIDE;
72 virtual bool ShouldShowWindowTitle() const OVERRIDE; 72 virtual bool ShouldShowWindowTitle() const OVERRIDE;
73 virtual views::Widget* GetWidget() OVERRIDE;
74 virtual const views::Widget* GetWidget() const OVERRIDE;
75 virtual views::NonClientFrameView* CreateNonClientFrameView( 73 virtual views::NonClientFrameView* CreateNonClientFrameView(
76 views::Widget* widget) OVERRIDE; 74 views::Widget* widget) OVERRIDE;
77 75
78 // Overridden from BaseWindow: 76 // Overridden from BaseWindow:
79 virtual bool IsActive() const OVERRIDE; 77 virtual bool IsActive() const OVERRIDE;
80 virtual bool IsMaximized() const OVERRIDE; 78 virtual bool IsMaximized() const OVERRIDE;
81 virtual bool IsMinimized() const OVERRIDE; 79 virtual bool IsMinimized() const OVERRIDE;
82 virtual bool IsFullscreen() const OVERRIDE; 80 virtual bool IsFullscreen() const OVERRIDE;
83 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; 81 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
84 virtual gfx::Rect GetRestoredBounds() const OVERRIDE; 82 virtual gfx::Rect GetRestoredBounds() const OVERRIDE;
(...skipping 18 matching lines...) Expand all
103 // Owned internal host class implementing WebContents and Extension Delegates. 101 // Owned internal host class implementing WebContents and Extension Delegates.
104 scoped_ptr<internal::PanelHost> host_; 102 scoped_ptr<internal::PanelHost> host_;
105 // Unowned pointer to the widget. 103 // Unowned pointer to the widget.
106 views::Widget* widget_; 104 views::Widget* widget_;
107 scoped_ptr<extensions::WindowController> extension_window_controller_; 105 scoped_ptr<extensions::WindowController> extension_window_controller_;
108 106
109 DISALLOW_COPY_AND_ASSIGN(PanelViewAura); 107 DISALLOW_COPY_AND_ASSIGN(PanelViewAura);
110 }; 108 };
111 109
112 #endif // CHROME_BROWSER_UI_VIEWS_ASH_PANEL_VIEW_AURA_H_ 110 #endif // CHROME_BROWSER_UI_VIEWS_ASH_PANEL_VIEW_AURA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698