OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ | 5 #ifndef BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ |
6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ | 6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/supports_user_data.h" | 9 #include "base/supports_user_data.h" |
10 #include "ui/gfx/geometry/size.h" | |
10 #include "url/gurl.h" | 11 #include "url/gurl.h" |
11 | 12 |
12 namespace blimp { | 13 namespace blimp { |
13 namespace client { | 14 namespace client { |
14 | 15 |
15 class BlimpContentsObserver; | 16 class BlimpContentsObserver; |
16 class BlimpNavigationController; | 17 class BlimpNavigationController; |
17 | 18 |
18 // BlimpContents is the core class in blimp client which is responsible for | 19 // BlimpContents is the core class in blimp client which is responsible for |
19 // rendering web pages in a rectangular area. The interaction with between the | 20 // rendering web pages in a rectangular area. The interaction with between the |
20 // client and engine is encapsulated behind this interface through the use of | 21 // client and engine is encapsulated behind this interface through the use of |
21 // the navigation controller. Each BlimpContents has exactly one | 22 // the navigation controller. Each BlimpContents has exactly one |
22 // BlimpNavigationController which can be used to load URLs, navigate | 23 // BlimpNavigationController which can be used to load URLs, navigate |
23 // backwards/forward etc. See blimp_navigation_controller.h for more details. | 24 // backwards/forward etc. See blimp_navigation_controller.h for more details. |
24 class BlimpContents : public base::SupportsUserData { | 25 class BlimpContents : public base::SupportsUserData { |
25 public: | 26 public: |
26 // Retrives the navigation controller that controls all navigation related | 27 // Retrives the navigation controller that controls all navigation related |
27 // to this BlimpContents. | 28 // to this BlimpContents. |
28 virtual BlimpNavigationController& GetNavigationController() = 0; | 29 virtual BlimpNavigationController& GetNavigationController() = 0; |
29 | 30 |
30 // Enables adding and removing observers to this BlimpContents. | 31 // Enables adding and removing observers to this BlimpContents. |
31 virtual void AddObserver(BlimpContentsObserver* observer) = 0; | 32 virtual void AddObserver(BlimpContentsObserver* observer) = 0; |
32 virtual void RemoveObserver(BlimpContentsObserver* observer) = 0; | 33 virtual void RemoveObserver(BlimpContentsObserver* observer) = 0; |
33 | 34 |
35 // Pushes the size and scale information to the engine, which will affect the | |
36 // web content display area for all tabs. | |
37 virtual void SetSizeAndScale(const gfx::Size& size, | |
nyquist
2016/08/16 20:41:04
Could this possibly be moved to the impl instead?
Menglin
2016/08/16 21:10:09
impl has this function now. it overrides this the
nyquist
2016/08/16 21:41:40
yeah, you should be able to do that.
Menglin
2016/08/17 19:48:46
Done.
| |
38 float device_pixel_ratio) = 0; | |
39 | |
34 protected: | 40 protected: |
35 BlimpContents() {} | 41 BlimpContents() {} |
36 | 42 |
37 private: | 43 private: |
38 DISALLOW_COPY_AND_ASSIGN(BlimpContents); | 44 DISALLOW_COPY_AND_ASSIGN(BlimpContents); |
39 }; | 45 }; |
40 | 46 |
41 } // namespace client | 47 } // namespace client |
42 } // namespace blimp | 48 } // namespace blimp |
43 | 49 |
44 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ | 50 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_CONTENTS_H_ |
OLD | NEW |