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

Side by Side Diff: ui/ozone/platform/test/test_window_manager.h

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 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
« no previous file with comments | « ui/ozone/platform/test/test_window.cc ('k') | ui/ozone/platform/test/test_window_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_OZONE_PLATFORM_TEST_FILE_SURFACE_FACTORY_H_
6 #define UI_OZONE_PLATFORM_TEST_FILE_SURFACE_FACTORY_H_
7
8 #include "base/files/file_path.h"
9 #include "base/id_map.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/threading/thread_checker.h"
12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/ozone/platform/test/test_window.h"
14 #include "ui/ozone/public/surface_factory_ozone.h"
15
16 namespace ui {
17
18 class TestWindowManager : public SurfaceFactoryOzone {
19 public:
20 explicit TestWindowManager(const base::FilePath& dump_location);
21 ~TestWindowManager() override;
22
23 // Initialize (mainly check that we have a place to write output to).
24 void Initialize();
25
26 // Register a new window. Returns the window id.
27 int32_t AddWindow(TestWindow* window);
28
29 // Remove a window.
30 void RemoveWindow(int32_t window_id, TestWindow* window);
31
32 // User-supplied path for images.
33 base::FilePath base_path() const;
34
35 // SurfaceFactoryOzone:
36 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget(
37 gfx::AcceleratedWidget w) override;
38 bool LoadEGLGLES2Bindings(
39 AddGLLibraryCallback add_gl_library,
40 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override;
41
42 private:
43 base::FilePath location_;
44
45 IDMap<TestWindow> windows_;
46 base::ThreadChecker thread_checker_;
47
48 DISALLOW_COPY_AND_ASSIGN(TestWindowManager);
49 };
50
51 } // namespace ui
52
53 #endif // UI_OZONE_PLATFORM_TEST_FILE_SURFACE_FACTORY_H_
OLDNEW
« no previous file with comments | « ui/ozone/platform/test/test_window.cc ('k') | ui/ozone/platform/test/test_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698