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

Unified Diff: mash/browser/browser.h

Issue 1981623002: Add a basic browser to mash that uses the navigation service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 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: mash/browser/browser.h
diff --git a/mash/browser/browser.h b/mash/browser/browser.h
new file mode 100644
index 0000000000000000000000000000000000000000..a4e57d8779be176ddb66c2e1de189f704a7e3ffe
--- /dev/null
+++ b/mash/browser/browser.h
@@ -0,0 +1,62 @@
+// Copyright 2016 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 MASH_BROWSER_BROWSER_H_
+#define MASH_BROWSER_BROWSER_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "mash/public/interfaces/launchable.mojom.h"
+#include "mojo/public/cpp/bindings/binding_set.h"
+#include "services/shell/public/cpp/shell_client.h"
+#include "services/tracing/public/cpp/tracing_impl.h"
+
+namespace views {
+class AuraInit;
+class Widget;
+}
+
+namespace mash {
+namespace browser {
+
+class Browser
+ : public shell::ShellClient,
+ public mojom::Launchable,
+ public shell::InterfaceFactory<mojom::Launchable> {
+ public:
+ Browser();
+ ~Browser() override;
+
+ void AddWindow(views::Widget* window);
sky 2016/05/16 15:31:58 Document what the widgets are, and ownership.
+ void RemoveWindow(views::Widget* window);
+
+ private:
+ // shell::ShellClient:
+ void Initialize(shell::Connector* connector,
+ const shell::Identity& identity,
+ uint32_t id) override;
+ bool AcceptConnection(shell::Connection* connection) override;
+
+ // mojom::Launchable:
+ void Launch(uint32_t what, mojom::LaunchMode how) override;
+
+ // shell::InterfaceFactory<mojom::Launchable>:
+ void Create(shell::Connection* connection,
+ mojom::LaunchableRequest request) override;
+
+ shell::Connector* connector_ = nullptr;
+ mojo::BindingSet<mojom::Launchable> bindings_;
+ std::vector<views::Widget*> windows_;
+
+ mojo::TracingImpl tracing_;
+ std::unique_ptr<views::AuraInit> aura_init_;
+
+ DISALLOW_COPY_AND_ASSIGN(Browser);
+};
+
+} // namespace browser
+} // namespace mash
+
+#endif // MASH_BROWSER_BROWSER_H_
« no previous file with comments | « mash/browser/DEPS ('k') | mash/browser/browser.cc » ('j') | mash/browser/browser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698