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

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

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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 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 SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
6 #define SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "third_party/mojo_services/src/input_events/public/interfaces/input_eve nts.mojom.h"
10 #include "third_party/mojo_services/src/native_viewport/public/interfaces/native _viewport.mojom.h"
11 #include "ui/gfx/geometry/size.h"
12 #include "ui/gfx/native_widget_types.h"
13
14 namespace gfx {
15 class Rect;
16 }
17
18 namespace native_viewport {
19
20 // Encapsulation of platform-specific Viewport.
21 class PlatformViewport {
22 public:
23 class Delegate {
24 public:
25 virtual ~Delegate() {}
26
27 virtual void OnMetricsChanged(mojo::ViewportMetricsPtr metrics) = 0;
28 virtual void OnAcceleratedWidgetAvailable(
29 gfx::AcceleratedWidget widget) = 0;
30 virtual void OnAcceleratedWidgetDestroyed() = 0;
31 virtual bool OnEvent(mojo::EventPtr event) = 0;
32 virtual void OnDestroyed() = 0;
33 };
34
35 virtual ~PlatformViewport() {}
36
37 virtual void Init(const gfx::Rect& bounds) = 0;
38 virtual void Show() = 0;
39 virtual void Hide() = 0;
40 virtual void Close() = 0;
41 virtual gfx::Size GetSize() = 0;
42 virtual void SetBounds(const gfx::Rect& bounds) = 0;
43
44 static scoped_ptr<PlatformViewport> Create(Delegate* delegate);
45 };
46
47 } // namespace native_viewport
48
49 #endif // SERVICES_NATIVE_VIEWPORT_PLATFORM_VIEWPORT_H_
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/onscreen_context_provider.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