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_PANELS_PANEL_HOST_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
11 #include "content/public/browser/web_contents_delegate.h" | 12 #include "content/public/browser/web_contents_delegate.h" |
12 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
13 #include "content/public/common/page_zoom.h" | 14 #include "content/public/common/page_zoom.h" |
14 #include "extensions/browser/extension_function_dispatcher.h" | 15 #include "extensions/browser/extension_function_dispatcher.h" |
15 | 16 |
16 class GURL; | 17 class GURL; |
17 class Panel; | 18 class Panel; |
18 class PrefsTabHelper; | 19 class PrefsTabHelper; |
19 class Profile; | 20 class Profile; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 void StopLoading(); | 89 void StopLoading(); |
89 void Zoom(content::PageZoom zoom); | 90 void Zoom(content::PageZoom zoom); |
90 | 91 |
91 private: | 92 private: |
92 // Helper to close panel via the message loop. | 93 // Helper to close panel via the message loop. |
93 void ClosePanel(); | 94 void ClosePanel(); |
94 | 95 |
95 Panel* panel_; // Weak, owns us. | 96 Panel* panel_; // Weak, owns us. |
96 Profile* profile_; | 97 Profile* profile_; |
97 | 98 |
98 scoped_ptr<content::WebContents> web_contents_; | 99 std::unique_ptr<content::WebContents> web_contents_; |
99 | 100 |
100 // The following factory is used to close the panel via the message loop. | 101 // The following factory is used to close the panel via the message loop. |
101 base::WeakPtrFactory<PanelHost> weak_factory_; | 102 base::WeakPtrFactory<PanelHost> weak_factory_; |
102 | 103 |
103 DISALLOW_COPY_AND_ASSIGN(PanelHost); | 104 DISALLOW_COPY_AND_ASSIGN(PanelHost); |
104 }; | 105 }; |
105 | 106 |
106 #endif // CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ | 107 #endif // CHROME_BROWSER_UI_PANELS_PANEL_HOST_H_ |
OLD | NEW |