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

Unified Diff: blimp/client/core/blimp_contents_impl.h

Issue 2040813004: Add BlimpContents[,Observer] and BlimpNavigationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git merge origin/master Created 4 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
« no previous file with comments | « blimp/client/core/BUILD.gn ('k') | blimp/client/core/blimp_contents_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/blimp_contents_impl.h
diff --git a/blimp/client/core/blimp_contents_impl.h b/blimp/client/core/blimp_contents_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..8710ab10a1e10f425c2b063783d53a20d6c6954c
--- /dev/null
+++ b/blimp/client/core/blimp_contents_impl.h
@@ -0,0 +1,50 @@
+// 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 BLIMP_CLIENT_CORE_BLIMP_CONTENTS_IMPL_H_
+#define BLIMP_CLIENT_CORE_BLIMP_CONTENTS_IMPL_H_
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "blimp/client/core/blimp_navigation_controller_delegate.h"
+#include "blimp/client/core/blimp_navigation_controller_impl.h"
+#include "blimp/client/core/public/blimp_contents.h"
+#include "url/gurl.h"
+
+namespace blimp {
+namespace client {
+
+class BlimpContentsObserver;
+class BlimpNavigationController;
+
+// BlimpContentsImpl is the implementation of the core class in
+// //blimp/client/core, the BlimpContents.
+class BlimpContentsImpl : public BlimpContents,
+ public BlimpNavigationControllerDelegate {
+ public:
+ BlimpContentsImpl();
+ ~BlimpContentsImpl() override;
+
+ // BlimpContents implementation.
+ BlimpNavigationControllerImpl& GetNavigationController() override;
+ void AddObserver(BlimpContentsObserver* observer) override;
+ void RemoveObserver(BlimpContentsObserver* observer) override;
+
+ // BlimpNavigationControllerDelegate implementation.
+ void NotifyURLLoaded(const GURL& url) override;
+
+ private:
+ // Handles the back/forward list and loading URLs.
+ BlimpNavigationControllerImpl navigation_controller_;
+
+ // A list of all the observers of this BlimpContentsImpl.
+ base::ObserverList<BlimpContentsObserver> observers_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlimpContentsImpl);
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_CORE_BLIMP_CONTENTS_IMPL_H_
« no previous file with comments | « blimp/client/core/BUILD.gn ('k') | blimp/client/core/blimp_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698