OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MANDOLINE_UI_BROWSER_BROWSER_UI_H_ | 5 #ifndef MANDOLINE_UI_BROWSER_BROWSER_UI_H_ |
6 #define MANDOLINE_UI_BROWSER_BROWSER_UI_H_ | 6 #define MANDOLINE_UI_BROWSER_BROWSER_UI_H_ |
7 | 7 |
8 namespace mojo { | 8 namespace mojo { |
9 class Shell; | 9 class Shell; |
10 class View; | 10 class View; |
11 } | 11 } |
12 | 12 |
13 namespace mandoline { | 13 namespace mandoline { |
14 | 14 |
15 class Browser; | 15 class Browser; |
16 | 16 |
17 class BrowserUI { | 17 class BrowserUI { |
18 public: | 18 public: |
19 virtual ~BrowserUI() {} | 19 virtual ~BrowserUI() {} |
20 static BrowserUI* Create(Browser* browser, mojo::Shell* shell); | 20 static BrowserUI* Create(Browser* browser, mojo::Shell* shell); |
21 | 21 |
22 // Called when the Browser UI is embedded within the specified view. | 22 // Called when the Browser UI is embedded within the specified view. |
| 23 // BrowserUI is destroyed prior to |root| being destroyed. That is, the |
| 24 // BrowserUI implementations can assume |root| is never deleted out from under |
| 25 // them. |
23 virtual void Init(mojo::View* root, mojo::View* content) = 0; | 26 virtual void Init(mojo::View* root, mojo::View* content) = 0; |
24 }; | 27 }; |
25 | 28 |
26 } // namespace mandoline | 29 } // namespace mandoline |
27 | 30 |
28 #endif // MANDOLINE_UI_BROWSER_BROWSER_UI_H_ | 31 #endif // MANDOLINE_UI_BROWSER_BROWSER_UI_H_ |
OLD | NEW |