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

Side by Side Diff: media/base/android/dialog_surface.h

Issue 2178973004: DialogSurfaceManager implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl feedback Created 4 years, 4 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 2016 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 MEDIA_BASE_ANDROID_DIALOG_SURFACE_H_
6 #define MEDIA_BASE_ANDROID_DIALOG_SURFACE_H_
7
8 #include <jni.h>
9 #include <stddef.h>
10 #include <stdint.h>
11
12 #include <set>
13 #include <string>
14
15 #include "base/android/scoped_java_ref.h"
16 #include "base/callback.h"
17 #include "base/macros.h"
18 #include "base/task_runner.h"
19 #include "base/threading/thread_checker.h"
20 #include "base/time/time.h"
21 #include "media/base/media_export.h"
22 #include "ui/gfx/geometry/rect.h"
23 #include "ui/gl/android/scoped_java_surface.h"
24
25 namespace media {
26
27 class DialogSurfaceCallback;
28 class DialogSurfaceManager;
29
30 // This class implements the C++ wrapper around a java DialogSurface.
31 // All callbacks happen on the thread that it's constructed on.
32 class MEDIA_EXPORT DialogSurface {
Tima Vaisburd 2016/08/03 18:05:13 A general comment: I like stub CLs because they ma
liberato (no reviews please) 2016/08/03 23:11:55 they're included because some of the internal stru
33 public:
34 // These must match DialogSurface.java
Tima Vaisburd 2016/08/03 18:05:13 I could not find DialogSurface.java in this CL. Wh
liberato (no reviews please) 2016/08/03 23:11:54 intentionally omitted for scope. i wanted to remo
35 enum CallbackOp { SURFACE_CREATED = 0, SURFACE_DESTROYED = 1 };
36
37 // Callback type for finding out about the status of the surface. While we
38 // don't use this directly, it lets us keep DialogSurfaceCallback as an
39 // implementation detail.
40 using Callback = base::Callback<void(CallbackOp)>;
41
42 // Configuration for the surface.
43 struct Config {
44 gfx::Rect rect;
45 // This may also include pixel format, is_secure, etc.
46 };
47 };
48
49 } // namespace media
50
51 #endif // MEDIA_BASE_ANDROID_DIALOG_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698