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

Side by Side Diff: mojo/services/native_viewport/platform_viewport.h

Issue 769173002: Move native_viewport and gles2 service impls to //services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 2013 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 MOJO_SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
6 #define MOJO_SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/gfx/size.h"
11
12 namespace gfx {
13 class Rect;
14 }
15
16 namespace ui {
17 class Event;
18 }
19
20 namespace mojo {
21
22 // Encapsulation of platform-specific Viewport.
23 class PlatformViewport {
24 public:
25 class Delegate {
26 public:
27 virtual ~Delegate() {}
28
29 virtual void OnBoundsChanged(const gfx::Rect& rect) = 0;
30 virtual void OnAcceleratedWidgetAvailable(
31 gfx::AcceleratedWidget widget) = 0;
32 virtual bool OnEvent(ui::Event* ui_event) = 0;
33 virtual void OnDestroyed() = 0;
34 };
35
36 virtual ~PlatformViewport() {}
37
38 virtual void Init(const gfx::Rect& bounds) = 0;
39 virtual void Show() = 0;
40 virtual void Hide() = 0;
41 virtual void Close() = 0;
42 virtual gfx::Size GetSize() = 0;
43 virtual void SetBounds(const gfx::Rect& bounds) = 0;
44
45 virtual void SetCapture() = 0;
46 virtual void ReleaseCapture() = 0;
47
48 static scoped_ptr<PlatformViewport> Create(Delegate* delegate);
49 };
50
51 } // namespace mojo
52
53 #endif // MOJO_SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/native_viewport_impl.cc ('k') | mojo/services/native_viewport/platform_viewport_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698