OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BLIMP_ENGINE_FEATURE_ENGINE_SETTINGS_FEATURE_H_ |
| 6 #define BLIMP_ENGINE_FEATURE_ENGINE_SETTINGS_FEATURE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" |
| 10 #include "blimp/engine/session/settings_manager.h" |
| 11 #include "blimp/net/blimp_message_processor.h" |
| 12 #include "content/public/browser/render_view_host.h" |
| 13 |
| 14 namespace blimp { |
| 15 class EngineSettingsMessage; |
| 16 |
| 17 namespace engine { |
| 18 |
| 19 // The feature is used to receive global settings from the client. |
| 20 class EngineSettingsFeature : public BlimpMessageProcessor { |
| 21 public: |
| 22 explicit EngineSettingsFeature(SettingsManager* settings_manager); |
| 23 ~EngineSettingsFeature() override; |
| 24 |
| 25 // BlimpMessageProcessor implementation. |
| 26 void ProcessMessage(scoped_ptr<BlimpMessage> message, |
| 27 const net::CompletionCallback& callback) override; |
| 28 |
| 29 private: |
| 30 void ProcessWebPreferences(const EngineSettingsMessage& settings); |
| 31 |
| 32 SettingsManager* settings_manager_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(EngineSettingsFeature); |
| 35 }; |
| 36 |
| 37 } // namespace engine |
| 38 } // namespace blimp |
| 39 |
| 40 #endif // BLIMP_ENGINE_FEATURE_ENGINE_SETTINGS_FEATURE_H_ |
OLD | NEW |