Chromium Code Reviews| Index: blimp/client/feature/settings_feature.h |
| diff --git a/blimp/client/feature/tab_control_feature.h b/blimp/client/feature/settings_feature.h |
| similarity index 52% |
| copy from blimp/client/feature/tab_control_feature.h |
| copy to blimp/client/feature/settings_feature.h |
| index d5e9f800fc23322bae1302a69ff83d64214f400b..33b729962e034db31a5caffe816fd29b2f53f387 100644 |
| --- a/blimp/client/feature/tab_control_feature.h |
| +++ b/blimp/client/feature/settings_feature.h |
| @@ -2,38 +2,28 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ |
| -#define BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ |
| +#ifndef BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_ |
| +#define BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_ |
| #include "base/macros.h" |
| -#include "base/memory/scoped_ptr.h" |
| #include "blimp/client/blimp_client_export.h" |
| #include "blimp/net/blimp_message_processor.h" |
| -#include "ui/gfx/geometry/size.h" |
| - |
| -namespace gfx { |
| -class Size; |
| -} |
| namespace blimp { |
| namespace client { |
| -class BLIMP_CLIENT_EXPORT TabControlFeature : public BlimpMessageProcessor { |
| +// The feature is used to send and receive global settings from the engine. |
|
haibinlu
2016/03/21 18:25:22
does client need to receive settings from Engine?
Khushal
2016/03/22 04:11:42
Not right now. Removed that code.
|
| +class BLIMP_CLIENT_EXPORT SettingsFeature : public BlimpMessageProcessor { |
| public: |
| - TabControlFeature(); |
| - ~TabControlFeature() override; |
| + SettingsFeature(); |
| + ~SettingsFeature() override; |
| // Set the BlimpMessageProcessor that will be used to send |
| - // BlimpMessage::TAB_CONTROL messages to the engine. |
| + // BlimpMessage::SETTINGS messages to the engine. |
| void set_outgoing_message_processor( |
| scoped_ptr<BlimpMessageProcessor> processor); |
| - // Pushes the current size and scale information to the engine, which will |
| - // affect the web content display area for all tabs. |
| - void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio); |
| - |
| - void CreateTab(int tab_id); |
| - void CloseTab(int tab_id); |
| + void SetRecordWholeDocument(bool record_whole_document); |
|
haibinlu
2016/03/21 18:25:22
use name consistently?
"record" --> "download"
Khushal
2016/03/22 04:11:42
So the name of the web preference is record_whole_
|
| private: |
| // BlimpMessageProcessor implementation. |
| @@ -44,13 +34,12 @@ class BLIMP_CLIENT_EXPORT TabControlFeature : public BlimpMessageProcessor { |
| scoped_ptr<BlimpMessageProcessor> outgoing_message_processor_; |
| // Used to avoid sending unnecessary messages to engine. |
| - gfx::Size last_size_; |
| - float last_device_pixel_ratio_ = -1; |
| + bool record_whole_document_; |
|
haibinlu
2016/03/21 18:25:22
ditto
|
| - DISALLOW_COPY_AND_ASSIGN(TabControlFeature); |
| + DISALLOW_COPY_AND_ASSIGN(SettingsFeature); |
| }; |
| } // namespace client |
| } // namespace blimp |
| -#endif // BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ |
| +#endif // BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_ |