Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
|
haibinlu
2016/03/21 18:25:22
2016
Khushal
2016/03/22 04:11:42
Done.
| |
| 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_TAB_CONTROL_FEATURE_H_ | 5 #ifndef BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_ |
| 6 #define BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ | 6 #define BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "blimp/client/blimp_client_export.h" | 9 #include "blimp/client/blimp_client_export.h" |
| 11 #include "blimp/net/blimp_message_processor.h" | 10 #include "blimp/net/blimp_message_processor.h" |
| 12 #include "ui/gfx/geometry/size.h" | |
| 13 | |
| 14 namespace gfx { | |
| 15 class Size; | |
| 16 } | |
| 17 | 11 |
| 18 namespace blimp { | 12 namespace blimp { |
| 19 namespace client { | 13 namespace client { |
| 20 | 14 |
| 21 class BLIMP_CLIENT_EXPORT TabControlFeature : public BlimpMessageProcessor { | 15 // 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.
| |
| 16 class BLIMP_CLIENT_EXPORT SettingsFeature : public BlimpMessageProcessor { | |
| 22 public: | 17 public: |
| 23 TabControlFeature(); | 18 SettingsFeature(); |
| 24 ~TabControlFeature() override; | 19 ~SettingsFeature() override; |
| 25 | 20 |
| 26 // Set the BlimpMessageProcessor that will be used to send | 21 // Set the BlimpMessageProcessor that will be used to send |
| 27 // BlimpMessage::TAB_CONTROL messages to the engine. | 22 // BlimpMessage::SETTINGS messages to the engine. |
| 28 void set_outgoing_message_processor( | 23 void set_outgoing_message_processor( |
| 29 scoped_ptr<BlimpMessageProcessor> processor); | 24 scoped_ptr<BlimpMessageProcessor> processor); |
| 30 | 25 |
| 31 // Pushes the current size and scale information to the engine, which will | 26 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_
| |
| 32 // affect the web content display area for all tabs. | |
| 33 void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio); | |
| 34 | |
| 35 void CreateTab(int tab_id); | |
| 36 void CloseTab(int tab_id); | |
| 37 | 27 |
| 38 private: | 28 private: |
| 39 // BlimpMessageProcessor implementation. | 29 // BlimpMessageProcessor implementation. |
| 40 void ProcessMessage(scoped_ptr<BlimpMessage> message, | 30 void ProcessMessage(scoped_ptr<BlimpMessage> message, |
| 41 const net::CompletionCallback& callback) override; | 31 const net::CompletionCallback& callback) override; |
| 42 | 32 |
| 43 // Used to send BlimpMessage::TAB_CONTROL messages to the engine. | 33 // Used to send BlimpMessage::TAB_CONTROL messages to the engine. |
| 44 scoped_ptr<BlimpMessageProcessor> outgoing_message_processor_; | 34 scoped_ptr<BlimpMessageProcessor> outgoing_message_processor_; |
| 45 | 35 |
| 46 // Used to avoid sending unnecessary messages to engine. | 36 // Used to avoid sending unnecessary messages to engine. |
| 47 gfx::Size last_size_; | 37 bool record_whole_document_; |
|
haibinlu
2016/03/21 18:25:22
ditto
| |
| 48 float last_device_pixel_ratio_ = -1; | |
| 49 | 38 |
| 50 DISALLOW_COPY_AND_ASSIGN(TabControlFeature); | 39 DISALLOW_COPY_AND_ASSIGN(SettingsFeature); |
| 51 }; | 40 }; |
| 52 | 41 |
| 53 } // namespace client | 42 } // namespace client |
| 54 } // namespace blimp | 43 } // namespace blimp |
| 55 | 44 |
| 56 #endif // BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ | 45 #endif // BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_ |
| OLD | NEW |