Chromium Code Reviews| Index: mandoline/ui/browser/browser_delegate.h |
| diff --git a/mandoline/ui/browser/browser_delegate.h b/mandoline/ui/browser/browser_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..67f12480f23539e348866d3c9a76b27eb1644d0d |
| --- /dev/null |
| +++ b/mandoline/ui/browser/browser_delegate.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_ |
| +#define MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_ |
| + |
| +namespace mojo { |
| +class View; |
| +} |
| + |
| +namespace mandoline { |
| + |
| +class Browser; |
| + |
| +// A BrowserDelegate is an interface to be implemented by an object that manages |
| +// the lifetime of a Browser. |
| +class BrowserDelegate { |
| + public: |
| + // Invoken when the Browser wishes to close. This gives the delegate the |
| + // opportunity to perform some cleanup. |
| + virtual void BrowserClosed(Browser* browser) = 0; |
| + |
| + // Requests initialization of state to display the browser on screen. |
|
sky
2015/06/29 16:56:02
Document return value.
Fady Samuel
2015/06/29 20:32:36
Done.
|
| + virtual bool InitUIIfNecessary(Browser* browser, mojo::View* root_view) = 0; |
| + protected: |
|
sky
2015/06/29 16:56:02
nit: newline between 25/26.
Fady Samuel
2015/06/29 20:32:36
Done.
|
| + virtual ~BrowserDelegate() {} |
| +}; |
| + |
| +} // mandoline |
| + |
| +#endif // MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_ |