OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BLIMP_CLIENT_FEATURE_NAVIGATION_FEATURE_H_ | 5 #ifndef BLIMP_CLIENT_FEATURE_NAVIGATION_FEATURE_H_ |
6 #define BLIMP_CLIENT_FEATURE_NAVIGATION_FEATURE_H_ | 6 #define BLIMP_CLIENT_FEATURE_NAVIGATION_FEATURE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/containers/small_map.h" | 11 #include "base/containers/small_map.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "blimp/client/blimp_client_export.h" | |
14 #include "blimp/net/blimp_message_processor.h" | 13 #include "blimp/net/blimp_message_processor.h" |
15 | 14 |
16 class GURL; | 15 class GURL; |
17 class SkBitmap; | 16 class SkBitmap; |
18 | 17 |
19 namespace blimp { | 18 namespace blimp { |
20 namespace client { | 19 namespace client { |
21 | 20 |
22 // Handles all incoming and outgoing protobuf messages of type | 21 // Handles all incoming and outgoing protobuf messages of type |
23 // RenderWidget::NAVIGATION. Delegates can be added to be notified of incoming | 22 // RenderWidget::NAVIGATION. Delegates can be added to be notified of incoming |
24 // messages. | 23 // messages. |
25 class BLIMP_CLIENT_EXPORT NavigationFeature : public BlimpMessageProcessor { | 24 class NavigationFeature : public BlimpMessageProcessor { |
26 public: | 25 public: |
27 // A delegate to be notified of specific navigation events related to a | 26 // A delegate to be notified of specific navigation events related to a |
28 // a particular tab. | 27 // a particular tab. |
29 class NavigationFeatureDelegate { | 28 class NavigationFeatureDelegate { |
30 public: | 29 public: |
31 virtual void OnUrlChanged(int tab_id, const GURL& url) = 0; | 30 virtual void OnUrlChanged(int tab_id, const GURL& url) = 0; |
32 virtual void OnFaviconChanged(int tab_id, const SkBitmap& favicon) = 0; | 31 virtual void OnFaviconChanged(int tab_id, const SkBitmap& favicon) = 0; |
33 virtual void OnTitleChanged(int tab_id, const std::string& title) = 0; | 32 virtual void OnTitleChanged(int tab_id, const std::string& title) = 0; |
34 virtual void OnLoadingChanged(int tab_id, bool loading) = 0; | 33 virtual void OnLoadingChanged(int tab_id, bool loading) = 0; |
35 virtual void OnPageLoadStatusUpdate(int tab_id, bool completed) = 0; | 34 virtual void OnPageLoadStatusUpdate(int tab_id, bool completed) = 0; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Used to send BlimpMessage::NAVIGATION messages to the engine. | 66 // Used to send BlimpMessage::NAVIGATION messages to the engine. |
68 std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_; | 67 std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_; |
69 | 68 |
70 DISALLOW_COPY_AND_ASSIGN(NavigationFeature); | 69 DISALLOW_COPY_AND_ASSIGN(NavigationFeature); |
71 }; | 70 }; |
72 | 71 |
73 } // namespace client | 72 } // namespace client |
74 } // namespace blimp | 73 } // namespace blimp |
75 | 74 |
76 #endif // BLIMP_CLIENT_FEATURE_NAVIGATION_FEATURE_H_ | 75 #endif // BLIMP_CLIENT_FEATURE_NAVIGATION_FEATURE_H_ |
OLD | NEW |