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

Side by Side Diff: sky/shell/ui/engine.h

Issue 1220353002: Add padding values to View.idl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 | « sky/shell/testing/test_runner.cc ('k') | sky/shell/ui/engine.cc » ('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 SKY_SHELL_UI_ENGINE_H_ 5 #ifndef SKY_SHELL_UI_ENGINE_H_
6 #define SKY_SHELL_UI_ENGINE_H_ 6 #define SKY_SHELL_UI_ENGINE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void BeginFrame(base::TimeTicks frame_time); 55 void BeginFrame(base::TimeTicks frame_time);
56 skia::RefPtr<SkPicture> Paint(); 56 skia::RefPtr<SkPicture> Paint();
57 57
58 private: 58 private:
59 // UIDelegate implementation: 59 // UIDelegate implementation:
60 void ConnectToEngine(mojo::InterfaceRequest<SkyEngine> request) override; 60 void ConnectToEngine(mojo::InterfaceRequest<SkyEngine> request) override;
61 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override; 61 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override;
62 void OnOutputSurfaceDestroyed() override; 62 void OnOutputSurfaceDestroyed() override;
63 63
64 // SkyEngine implementation: 64 // SkyEngine implementation:
65 void OnViewportMetricsChanged(int width, int height, 65 void OnViewportMetricsChanged(ViewportMetricsPtr metrics) override;
66 float device_pixel_ratio) override;
67 void OnInputEvent(InputEventPtr event) override; 66 void OnInputEvent(InputEventPtr event) override;
68 67
69 void RunFromNetwork(const mojo::String& url) override; 68 void RunFromNetwork(const mojo::String& url) override;
70 void RunFromFile(const mojo::String& main, 69 void RunFromFile(const mojo::String& main,
71 const mojo::String& package_root) override; 70 const mojo::String& package_root) override;
72 void RunFromSnapshot(const mojo::String& path) override; 71 void RunFromSnapshot(const mojo::String& path) override;
73 void RunFromBundle(const mojo::String& path) override; 72 void RunFromBundle(const mojo::String& path) override;
74 73
75 // SkyViewClient methods: 74 // SkyViewClient methods:
76 void ScheduleFrame() override; 75 void ScheduleFrame() override;
77 void DidCreateIsolate(Dart_Isolate isolate) override; 76 void DidCreateIsolate(Dart_Isolate isolate) override;
78 77
79 // Services methods: 78 // Services methods:
80 mojo::NavigatorHost* NavigatorHost() override; 79 mojo::NavigatorHost* NavigatorHost() override;
81 80
82 // NavigatorHost methods: 81 // NavigatorHost methods:
83 void RequestNavigate(mojo::Target target, 82 void RequestNavigate(mojo::Target target,
84 mojo::URLRequestPtr request) override; 83 mojo::URLRequestPtr request) override;
85 void DidNavigateLocally(const mojo::String& url) override; 84 void DidNavigateLocally(const mojo::String& url) override;
86 void RequestNavigateHistory(int32_t delta) override; 85 void RequestNavigateHistory(int32_t delta) override;
87 86
88 void RunFromLibrary(const std::string& name); 87 void RunFromLibrary(const std::string& name);
89 void RunFromSnapshotStream(const std::string& name, 88 void RunFromSnapshotStream(const std::string& name,
90 mojo::ScopedDataPipeConsumerHandle snapshot); 89 mojo::ScopedDataPipeConsumerHandle snapshot);
91 90
92 void UpdateSkyViewSize();
93
94 Config config_; 91 Config config_;
95 scoped_ptr<Animator> animator_; 92 scoped_ptr<Animator> animator_;
96 93
97 mojo::asset_bundle::AssetBundlePtr root_bundle_; 94 mojo::asset_bundle::AssetBundlePtr root_bundle_;
98 scoped_ptr<blink::DartLibraryProvider> dart_library_provider_; 95 scoped_ptr<blink::DartLibraryProvider> dart_library_provider_;
99 std::unique_ptr<blink::SkyView> sky_view_; 96 std::unique_ptr<blink::SkyView> sky_view_;
100 97
101 float device_pixel_ratio_;
102 gfx::Size physical_size_; 98 gfx::Size physical_size_;
99 blink::SkyDisplayMetrics display_metrics_;
103 mojo::Binding<SkyEngine> binding_; 100 mojo::Binding<SkyEngine> binding_;
104 101
105 base::WeakPtrFactory<Engine> weak_factory_; 102 base::WeakPtrFactory<Engine> weak_factory_;
106 103
107 DISALLOW_COPY_AND_ASSIGN(Engine); 104 DISALLOW_COPY_AND_ASSIGN(Engine);
108 }; 105 };
109 106
110 } // namespace shell 107 } // namespace shell
111 } // namespace sky 108 } // namespace sky
112 109
113 #endif // SKY_SHELL_UI_ENGINE_H_ 110 #endif // SKY_SHELL_UI_ENGINE_H_
OLDNEW
« no previous file with comments | « sky/shell/testing/test_runner.cc ('k') | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698