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

Unified Diff: blimp/client/core/contents/navigation_feature.h

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 years, 11 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: blimp/client/core/contents/navigation_feature.h
diff --git a/blimp/client/core/contents/navigation_feature.h b/blimp/client/core/contents/navigation_feature.h
deleted file mode 100644
index 7b128dd4103a169ba014a721a7dd514a85d56481..0000000000000000000000000000000000000000
--- a/blimp/client/core/contents/navigation_feature.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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 BLIMP_CLIENT_CORE_CONTENTS_NAVIGATION_FEATURE_H_
-#define BLIMP_CLIENT_CORE_CONTENTS_NAVIGATION_FEATURE_H_
-
-#include <map>
-#include <string>
-
-#include "base/containers/small_map.h"
-#include "base/macros.h"
-#include "blimp/net/blimp_message_processor.h"
-
-class GURL;
-class SkBitmap;
-
-namespace blimp {
-namespace client {
-
-// Handles all incoming and outgoing protobuf messages of type
-// RenderWidget::NAVIGATION. Delegates can be added to be notified of incoming
-// messages.
-class NavigationFeature : public BlimpMessageProcessor {
- public:
- // A delegate to be notified of specific navigation events related to a
- // a particular tab.
- class NavigationFeatureDelegate {
- public:
- virtual ~NavigationFeatureDelegate() {}
- virtual void OnUrlChanged(int tab_id, const GURL& url) = 0;
- virtual void OnFaviconChanged(int tab_id, const SkBitmap& favicon) = 0;
- virtual void OnTitleChanged(int tab_id, const std::string& title) = 0;
- virtual void OnLoadingChanged(int tab_id, bool loading) = 0;
- virtual void OnPageLoadStatusUpdate(int tab_id, bool completed) = 0;
- };
-
- NavigationFeature();
- ~NavigationFeature() override;
-
- // Set the BlimpMessageProcessor that will be used to send
- // BlimpMessage::NAVIGATION messages to the engine.
- void set_outgoing_message_processor(
- std::unique_ptr<BlimpMessageProcessor> processor);
-
- // Sets a NavigationMessageDelegate to be notified of all navigation messages
- // for |tab_id| from the engine.
- void SetDelegate(int tab_id, NavigationFeatureDelegate* delegate);
- void RemoveDelegate(int tab_id);
-
- // Virtual for testing.
- virtual void NavigateToUrlText(int tab_id, const std::string& url_text);
- virtual void Reload(int tab_id);
- virtual void GoForward(int tab_id);
- virtual void GoBack(int tab_id);
-
- // BlimpMessageProcessor implementation.
- void ProcessMessage(std::unique_ptr<BlimpMessage> message,
- const net::CompletionCallback& callback) override;
-
- protected:
- // Finds the NavigationFeatureDelegate for a |tab_id|, protected for unit
- // tests.
- NavigationFeatureDelegate* FindDelegate(const int tab_id);
-
- private:
- base::SmallMap<std::map<int, NavigationFeatureDelegate*>> delegates_;
-
- // Used to send BlimpMessage::NAVIGATION messages to the engine.
- std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationFeature);
-};
-
-} // namespace client
-} // namespace blimp
-
-#endif // BLIMP_CLIENT_CORE_CONTENTS_NAVIGATION_FEATURE_H_
« no previous file with comments | « blimp/client/core/contents/mock_navigation_feature_delegate.cc ('k') | blimp/client/core/contents/navigation_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698