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

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

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration Created 3 years, 11 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.
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_CLIENT_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_
6 #define BLIMP_CLIENT_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "blimp/net/blimp_message_processor.h"
12 #include "ui/gfx/geometry/size.h"
13
14 namespace gfx {
15 class Size;
16 }
17
18 namespace blimp {
19 namespace client {
20
21 class TabControlFeature : public BlimpMessageProcessor {
22 public:
23 TabControlFeature();
24 ~TabControlFeature() override;
25
26 // Set the BlimpMessageProcessor that will be used to send
27 // BlimpMessage::TAB_CONTROL messages to the engine.
28 void set_outgoing_message_processor(
29 std::unique_ptr<BlimpMessageProcessor> processor);
30
31 // Pushes the current size and scale information to the engine, which will
32 // affect the web content display area for all tabs.
33 virtual void SetSizeAndScale(const gfx::Size& size, float device_pixel_ratio);
34
35 virtual void CreateTab(int tab_id);
36 virtual void CloseTab(int tab_id);
37
38 // BlimpMessageProcessor implementation.
39 void ProcessMessage(std::unique_ptr<BlimpMessage> message,
40 const net::CompletionCallback& callback) override;
41
42 private:
43 // Used to send BlimpMessage::TAB_CONTROL messages to the engine.
44 std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_;
45
46 // Used to avoid sending unnecessary messages to engine.
47 gfx::Size last_size_;
48 float last_device_pixel_ratio_ = -1;
49
50 DISALLOW_COPY_AND_ASSIGN(TabControlFeature);
51 };
52
53 } // namespace client
54 } // namespace blimp
55
56 #endif // BLIMP_CLIENT_CORE_CONTENTS_TAB_CONTROL_FEATURE_H_
OLDNEW
« no previous file with comments | « blimp/client/core/contents/navigation_feature_unittest.cc ('k') | blimp/client/core/contents/tab_control_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698