Upstreaming browser/ui/uikit_ui_util from iOS.
[chromium-blink-merge.git] / mandoline / ui / browser / browser_delegate.h
blob3446a2e059fd13c91494fd9921f2e7ff18d0c9c6
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.
5 #ifndef MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_
6 #define MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_
8 namespace mojo {
9 class View;
12 namespace mandoline {
14 class Browser;
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;
24 // Requests initialization of state to display the browser on screen.
25 virtual void InitUIIfNecessary(Browser* browser, mojo::View* root_view) = 0;
27 protected:
28 virtual ~BrowserDelegate() {}
31 } // mandoline
33 #endif // MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_