| OLD | NEW |
| 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_TAB_CONTROL_FEATURE_H_ | 5 #ifndef BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ |
| 6 #define BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ | 6 #define BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 void set_outgoing_message_processor( | 28 void set_outgoing_message_processor( |
| 29 std::unique_ptr<BlimpMessageProcessor> processor); | 29 std::unique_ptr<BlimpMessageProcessor> processor); |
| 30 | 30 |
| 31 // Pushes the current size and scale information to the engine, which will | 31 // Pushes the current size and scale information to the engine, which will |
| 32 // affect the web content display area for all tabs. | 32 // affect the web content display area for all tabs. |
| 33 void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio); | 33 void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio); |
| 34 | 34 |
| 35 void CreateTab(int tab_id); | 35 void CreateTab(int tab_id); |
| 36 void CloseTab(int tab_id); | 36 void CloseTab(int tab_id); |
| 37 | 37 |
| 38 private: | |
| 39 // BlimpMessageProcessor implementation. | 38 // BlimpMessageProcessor implementation. |
| 40 void ProcessMessage(std::unique_ptr<BlimpMessage> message, | 39 void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
| 41 const net::CompletionCallback& callback) override; | 40 const net::CompletionCallback& callback) override; |
| 42 | 41 |
| 42 private: |
| 43 // Used to send BlimpMessage::TAB_CONTROL messages to the engine. | 43 // Used to send BlimpMessage::TAB_CONTROL messages to the engine. |
| 44 std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_; | 44 std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_; |
| 45 | 45 |
| 46 // Used to avoid sending unnecessary messages to engine. | 46 // Used to avoid sending unnecessary messages to engine. |
| 47 gfx::Size last_size_; | 47 gfx::Size last_size_; |
| 48 float last_device_pixel_ratio_ = -1; | 48 float last_device_pixel_ratio_ = -1; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(TabControlFeature); | 50 DISALLOW_COPY_AND_ASSIGN(TabControlFeature); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace client | 53 } // namespace client |
| 54 } // namespace blimp | 54 } // namespace blimp |
| 55 | 55 |
| 56 #endif // BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ | 56 #endif // BLIMP_CLIENT_FEATURE_TAB_CONTROL_FEATURE_H_ |
| OLD | NEW |