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

Side by Side Diff: blimp/client/core/render_widget/render_widget_feature.h

Issue 2241623002: blimp: Move compositing, input and render widget feature to client/core. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments from #7 Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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_RENDER_WIDGET_FEATURE_H_ 5 #ifndef BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_
6 #define BLIMP_CLIENT_FEATURE_RENDER_WIDGET_FEATURE_H_ 6 #define BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 12
13 #include "base/containers/small_map.h" 13 #include "base/containers/small_map.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "blimp/net/blimp_message_processor.h" 15 #include "blimp/net/blimp_message_processor.h"
16 #include "blimp/net/input_message_generator.h" 16 #include "blimp/net/input_message_generator.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // be one RenderWidgetMessageDelegate per tab. 87 // be one RenderWidgetMessageDelegate per tab.
88 // virtual for testing. 88 // virtual for testing.
89 virtual void SetDelegate(int tab_id, RenderWidgetFeatureDelegate* delegate); 89 virtual void SetDelegate(int tab_id, RenderWidgetFeatureDelegate* delegate);
90 virtual void RemoveDelegate(const int tab_id); 90 virtual void RemoveDelegate(const int tab_id);
91 91
92 // BlimpMessageProcessor implementation. 92 // BlimpMessageProcessor implementation.
93 void ProcessMessage(std::unique_ptr<BlimpMessage> message, 93 void ProcessMessage(std::unique_ptr<BlimpMessage> message,
94 const net::CompletionCallback& callback) override; 94 const net::CompletionCallback& callback) override;
95 95
96 private: 96 private:
97 void ProcessRenderWidgetMessage( 97 void ProcessRenderWidgetMessage(RenderWidgetFeatureDelegate* delegate,
98 RenderWidgetFeatureDelegate* delegate, 98 const RenderWidgetMessage& message);
99 const RenderWidgetMessage& message);
100 99
101 void ProcessCompositorMessage(RenderWidgetFeatureDelegate* delegate, 100 void ProcessCompositorMessage(RenderWidgetFeatureDelegate* delegate,
102 const CompositorMessage& message); 101 const CompositorMessage& message);
103 102
104 // Returns nullptr if no delegate is found. 103 // Returns nullptr if no delegate is found.
105 RenderWidgetFeatureDelegate* FindDelegate(const int tab_id); 104 RenderWidgetFeatureDelegate* FindDelegate(const int tab_id);
106 105
107 typedef base::SmallMap<std::map<int, RenderWidgetFeatureDelegate*>> 106 typedef base::SmallMap<std::map<int, RenderWidgetFeatureDelegate*>>
108 DelegateMap; 107 DelegateMap;
109 108
110 DelegateMap delegates_; 109 DelegateMap delegates_;
111 110
112 InputMessageGenerator input_message_generator_; 111 InputMessageGenerator input_message_generator_;
113 112
114 // Used to send BlimpMessage::INPUT type messages to the engine. 113 // Used to send BlimpMessage::INPUT type messages to the engine.
115 std::unique_ptr<BlimpMessageProcessor> outgoing_input_message_processor_; 114 std::unique_ptr<BlimpMessageProcessor> outgoing_input_message_processor_;
116 115
117 // Used to send BlimpMessage::COMPOSITOR messages to the engine. 116 // Used to send BlimpMessage::COMPOSITOR messages to the engine.
118 std::unique_ptr<BlimpMessageProcessor> outgoing_compositor_message_processor_; 117 std::unique_ptr<BlimpMessageProcessor> outgoing_compositor_message_processor_;
119 118
120 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFeature); 119 DISALLOW_COPY_AND_ASSIGN(RenderWidgetFeature);
121 }; 120 };
122 121
123 } // namespace client 122 } // namespace client
124 } // namespace blimp 123 } // namespace blimp
125 124
126 #endif // BLIMP_CLIENT_FEATURE_RENDER_WIDGET_FEATURE_H_ 125 #endif // BLIMP_CLIENT_CORE_RENDER_WIDGET_RENDER_WIDGET_FEATURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698