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

Side by Side Diff: mojo/services/native_viewport/interfaces/native_viewport.mojom

Issue 1741963002: Auto-formatted all .mojom files. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Switch to 80 char line length limit. Created 4 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 module mojo; 5 module mojo;
6 6
7 import "geometry/interfaces/geometry.mojom"; 7 import "geometry/interfaces/geometry.mojom";
8 import "gpu/interfaces/context_provider.mojom"; 8 import "gpu/interfaces/context_provider.mojom";
9 import "native_viewport/interfaces/native_viewport_event_dispatcher.mojom"; 9 import "native_viewport/interfaces/native_viewport_event_dispatcher.mojom";
10 10
11 struct ViewportMetrics { 11 struct ViewportMetrics {
12 Size size; 12 Size size;
13 float device_pixel_ratio = 1.0; 13 float device_pixel_ratio = 1.0;
14 }; 14 };
15 15
16 struct SurfaceConfiguration { 16 struct SurfaceConfiguration {
17 uint8 red_bits = 8; 17 uint8 red_bits = 8;
18 uint8 green_bits = 8; 18 uint8 green_bits = 8;
19 uint8 blue_bits = 8; 19 uint8 blue_bits = 8;
20 uint8 alpha_bits = 8; 20 uint8 alpha_bits = 8;
21 uint8 depth_bits; 21 uint8 depth_bits;
22 uint8 stencil_bits; 22 uint8 stencil_bits;
23 }; 23 };
24 24
25 [ServiceName="mojo::NativeViewport"] 25 [ServiceName="mojo::NativeViewport"]
26 interface NativeViewport { 26 interface NativeViewport {
27 // TODO(sky): having a create function is awkward. Should there be a factory 27 // TODO(sky): having a create function is awkward. Should there be a factory
28 // to create the NativeViewport that takes the size? 28 // to create the NativeViewport that takes the size?
29 // When the viewport is created it is initially shown. 29 // When the viewport is created it is initially shown.
30 Create(Size size, SurfaceConfiguration? requested_configuration) => (ViewportM etrics metrics); 30 Create(Size size, SurfaceConfiguration? requested_configuration)
31 => (ViewportMetrics metrics);
jamesr 2016/03/09 19:18:08 was this over 80col before?
azani 2016/03/15 22:18:48 Yes.
31 32
32 Show(); 33 Show();
33 Hide(); 34 Hide();
34 Close(); 35 Close();
35 SetSize(Size size); 36 SetSize(Size size);
36 SetEventDispatcher(NativeViewportEventDispatcher dispatcher); 37 SetEventDispatcher(NativeViewportEventDispatcher dispatcher);
37 38
38 // Requests a ContextProvider capable of producing contexts that draw to 39 // Requests a ContextProvider capable of producing contexts that draw to
39 // this native viewport. 40 // this native viewport.
40 GetContextProvider(ContextProvider& provider); 41 GetContextProvider(ContextProvider& provider);
41 42
42 // The initial viewport metrics will be sent in the reply to the Create 43 // The initial viewport metrics will be sent in the reply to the Create
43 // method. Call RequestMetrics() to receive updates when the viewport metrics 44 // method. Call RequestMetrics() to receive updates when the viewport metrics
44 // change. The reply will be sent when the viewport metrics are different from 45 // change. The reply will be sent when the viewport metrics are different from
45 // the values last sent, so to receive continuous updates call this method 46 // the values last sent, so to receive continuous updates call this method
46 // again after receiving the callback. 47 // again after receiving the callback.
47 RequestMetrics() => (ViewportMetrics metrics); 48 RequestMetrics() => (ViewportMetrics metrics);
48 }; 49 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698