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

Side by Side Diff: blimp/client/core/contents/tab_control_feature.h

Issue 2255533002: Add TabControlFeature to BlimpClientContextImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to head Created 4 years, 4 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
« no previous file with comments | « blimp/client/core/contents/blimp_contents_observer_unittest.cc ('k') | ui/gfx/geometry/box_f.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_ 5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_
6 #define BLIMP_CLIENT_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_ 6 #define BLIMP_CLIENT_CORE_CONTENTS_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 12 matching lines...) Expand all
23 TabControlFeature(); 23 TabControlFeature();
24 ~TabControlFeature() override; 24 ~TabControlFeature() override;
25 25
26 // Set the BlimpMessageProcessor that will be used to send 26 // Set the BlimpMessageProcessor that will be used to send
27 // BlimpMessage::TAB_CONTROL messages to the engine. 27 // BlimpMessage::TAB_CONTROL messages to the engine.
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 virtual void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio);
34 34
35 void CreateTab(int tab_id); 35 virtual void CreateTab(int tab_id);
36 void CloseTab(int tab_id); 36 virtual void CloseTab(int tab_id);
37 37
38 // BlimpMessageProcessor implementation. 38 // BlimpMessageProcessor implementation.
39 void ProcessMessage(std::unique_ptr<BlimpMessage> message, 39 void ProcessMessage(std::unique_ptr<BlimpMessage> message,
40 const net::CompletionCallback& callback) override; 40 const net::CompletionCallback& callback) override;
41 41
42 private: 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_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_ 56 #endif // BLIMP_CLIENT_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_
OLDNEW
« no previous file with comments | « blimp/client/core/contents/blimp_contents_observer_unittest.cc ('k') | ui/gfx/geometry/box_f.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698