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

Side by Side Diff: blimp/engine/feature/engine_settings_feature.h

Issue 1810213009: blimp: Add settings to allow the client to download the whole page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@record_full_document
Patch Set: Created 4 years, 9 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
haibinlu 2016/03/21 18:25:22 2016
Khushal 2016/03/22 04:11:43 Done.
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/net/blimp_message_processor.h"
11 #include "content/public/browser/render_view_host.h"
12
13 namespace blimp {
14 class EngineSettingsMessage;
15
16 // The feature is used to send and receive global settings from the client.
17 class EngineSettingsFeature : public BlimpMessageProcessor {
18 public:
19 // An observer interested in knowing when the engine settings have changed.
20 class Observer {
21 public:
22 // Called when the WebPreferences set from the client have changed.
haibinlu 2016/03/21 18:25:22 can you list a few web preferences in the method d
Khushal 2016/03/22 04:11:43 Done.
23 virtual void OnWebPreferencesChanged() {}
24 };
25
26 EngineSettingsFeature();
27 ~EngineSettingsFeature() override;
28
29 // Set the BlimpMessageProcessor that will be used to send
30 // BlimpMessage::SETTINGS messages to the client.
31 void set_outgoing_message_processor(
haibinlu 2016/03/21 18:25:22 remove? since Engine does not send settings to Cli
Khushal 2016/03/22 04:11:43 Done.
32 scoped_ptr<BlimpMessageProcessor> processor);
33
34 void AddObserver(Observer* observer);
35 void RemoveObserver(Observer* observer);
36
37 // Called to update the WebPreferences for the RenderViewHost.
haibinlu 2016/03/21 18:25:23 this method goes to SettingsManager if we go with
Khushal 2016/03/22 04:11:43 Done.
38 void UpdateWebkitPreferences(
39 content::RenderViewHost* render_view_host);
40
41 private:
42 // BlimpMessageProcessor implementation.
43 void ProcessMessage(scoped_ptr<BlimpMessage> message,
44 const net::CompletionCallback& callback) override;
45
46 void ProcessWebPreferences(const EngineSettingsMessage& settings);
47
48 // Used to send BlimpMessage::TAB_CONTROL messages to the engine.
haibinlu 2016/03/21 18:25:23 Settings message
49 scoped_ptr<BlimpMessageProcessor> outgoing_message_processor_;
50
51 // Used to cache settings received from the engine to avoid unnecessarily
52 // notifying the observers.
53
54 // -------WebPreferences-------
55 bool record_whole_document_;
56
57 base::ObserverList<Observer> observer_list_;
58
59 DISALLOW_COPY_AND_ASSIGN(EngineSettingsFeature);
60 };
61
62 } // namespace blimp
63
64 #endif // BLIMP_ENGINE_FEATURE_ENGINE_SETTINGS_FEATURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698