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

Side by Side Diff: ui/aura/local/window_port_local.h

Issue 2868473002: Implement aura::Window::CreateCompositorFrameSink() (Closed)
Patch Set: Rebase Created 3 years, 7 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
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 UI_AURA_WINDOW_PORT_LOCAL_H_ 5 #ifndef UI_AURA_LOCAL_WINDOW_PORT_LOCAL_H_
6 #define UI_AURA_WINDOW_PORT_LOCAL_H_ 6 #define UI_AURA_LOCAL_WINDOW_PORT_LOCAL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "cc/surfaces/frame_sink_id.h"
9 #include "ui/aura/window_port.h" 11 #include "ui/aura/window_port.h"
10 #include "ui/base/property_data.h" 12 #include "ui/base/property_data.h"
11 13
14 namespace cc {
15 class SurfaceId;
16 }
17
18 namespace gfx {
19 class Size;
20 }
21
12 namespace aura { 22 namespace aura {
13 23
14 class Window; 24 class Window;
15 25
16 // WindowPort implementation for classic aura, e.g. not mus. 26 // WindowPort implementation for classic aura, e.g. not mus.
17 class AURA_EXPORT WindowPortLocal : public WindowPort { 27 class AURA_EXPORT WindowPortLocal : public WindowPort {
18 public: 28 public:
19 explicit WindowPortLocal(Window* window); 29 explicit WindowPortLocal(Window* window);
20 ~WindowPortLocal() override; 30 ~WindowPortLocal() override;
21 31
22 // WindowPort: 32 // WindowPort:
23 void OnPreInit(Window* window) override; 33 void OnPreInit(Window* window) override;
24 void OnDeviceScaleFactorChanged(float device_scale_factor) override; 34 void OnDeviceScaleFactorChanged(float device_scale_factor) override;
25 void OnWillAddChild(Window* child) override; 35 void OnWillAddChild(Window* child) override;
26 void OnWillRemoveChild(Window* child) override; 36 void OnWillRemoveChild(Window* child) override;
27 void OnWillMoveChild(size_t current_index, size_t dest_index) override; 37 void OnWillMoveChild(size_t current_index, size_t dest_index) override;
28 void OnVisibilityChanged(bool visible) override; 38 void OnVisibilityChanged(bool visible) override;
29 void OnDidChangeBounds(const gfx::Rect& old_bounds, 39 void OnDidChangeBounds(const gfx::Rect& old_bounds,
30 const gfx::Rect& new_bounds) override; 40 const gfx::Rect& new_bounds) override;
31 std::unique_ptr<ui::PropertyData> OnWillChangeProperty( 41 std::unique_ptr<ui::PropertyData> OnWillChangeProperty(
32 const void* key) override; 42 const void* key) override;
33 void OnPropertyChanged(const void* key, 43 void OnPropertyChanged(const void* key,
34 int64_t old_value, 44 int64_t old_value,
35 std::unique_ptr<ui::PropertyData> data) override; 45 std::unique_ptr<ui::PropertyData> data) override;
46 std::unique_ptr<cc::CompositorFrameSink> OnCreateCompositorFrameSink()
47 override;
48 void OnWindowAddedToRootWindow() override;
49 void OnWindowRemovingFromRootWindow() override;
36 50
37 private: 51 private:
38 Window* window_; 52 void OnSurfaceChanged(const cc::SurfaceId& surface_id,
53 const gfx::Size& surface_size);
54
55 Window* const window_;
56 cc::FrameSinkId frame_sink_id_;
57
58 base::WeakPtrFactory<WindowPortLocal> weak_factory_;
39 59
40 DISALLOW_COPY_AND_ASSIGN(WindowPortLocal); 60 DISALLOW_COPY_AND_ASSIGN(WindowPortLocal);
41 }; 61 };
42 62
43 } // namespace aura 63 } // namespace aura
44 64
45 #endif // UI_AURA_WINDOW_PORT_LOCAL_H_ 65 #endif // UI_AURA_LOCAL_WINDOW_PORT_LOCAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698