Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Unified Diff: mandoline/ui/browser/browser_delegate.h

Issue 1195003002: Mandoline: Introduce ApplicationConnection::CloseConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..51985f67555bf0803d76f4ba2ec7db034de00a5f
--- /dev/null
+++ b/mandoline/ui/browser/browser_delegate.h
@@ -0,0 +1,34 @@
+// 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. Returns
+ // whether UI was initialized at this point.
+ virtual bool InitUIIfNecessary(Browser* browser, mojo::View* root_view) = 0;
+
+ protected:
+ virtual ~BrowserDelegate() {}
+};
+
+} // mandoline
+
+#endif // MANDOLINE_UI_BROWSER_BROWSER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698