OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_ |
| 6 #define MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_ |
| 7 |
| 8 namespace mojo { |
| 9 class View; |
| 10 } |
| 11 |
| 12 namespace mandoline { |
| 13 |
| 14 class Browser; |
| 15 |
| 16 // A BrowserDelegate is an interface to be implemented by an object that manages |
| 17 // the lifetime of a Browser. |
| 18 class BrowserDelegate { |
| 19 public: |
| 20 // Invoken when the Browser wishes to close. This gives the delegate the |
| 21 // opportunity to perform some cleanup. |
| 22 virtual void BrowserClosed(Browser* browser) = 0; |
| 23 |
| 24 // Requests initialization of state to display the browser on screen. Returns |
| 25 // whether UI was initialized at this point. |
| 26 virtual bool InitUIIfNecessary(Browser* browser, mojo::View* root_view) = 0; |
| 27 |
| 28 protected: |
| 29 virtual ~BrowserDelegate() {} |
| 30 }; |
| 31 |
| 32 } // mandoline |
| 33 |
| 34 #endif // MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_ |
OLD | NEW |