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

Side by Side Diff: components/bitmap_uploader/bitmap_uploader.h

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_ 5 #ifndef COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_
6 #define COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_ 6 #define COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLOADER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/bitmap_uploader/bitmap_uploader_export.h" 13 #include "components/bitmap_uploader/bitmap_uploader_export.h"
14 #include "components/mus/public/cpp/window_surface.h" 14 #include "components/mus/public/cpp/window_surface.h"
15 #include "components/mus/public/interfaces/compositor_frame.mojom.h" 15 #include "components/mus/public/interfaces/compositor_frame.mojom.h"
16 #include "components/mus/public/interfaces/gpu.mojom.h" 16 #include "components/mus/public/interfaces/gpu.mojom.h"
17 #include "gpu/GLES2/gl2chromium.h" 17 #include "gpu/GLES2/gl2chromium.h"
18 #include "gpu/GLES2/gl2extchromium.h" 18 #include "gpu/GLES2/gl2extchromium.h"
19 #include "mojo/public/c/gles2/gles2.h" 19 #include "mojo/public/c/gles2/gles2.h"
20 20
21 namespace mojo { 21 namespace mojo {
22 class Shell; 22 class Connector;
23 } 23 }
24 24
25 namespace bitmap_uploader { 25 namespace bitmap_uploader {
26 26
27 BITMAP_UPLOADER_EXPORT extern const char kBitmapUploaderForAcceleratedWidget[]; 27 BITMAP_UPLOADER_EXPORT extern const char kBitmapUploaderForAcceleratedWidget[];
28 28
29 // BitmapUploader is useful if you want to draw a bitmap or color in a 29 // BitmapUploader is useful if you want to draw a bitmap or color in a
30 // mus::Window. 30 // mus::Window.
31 class BITMAP_UPLOADER_EXPORT BitmapUploader 31 class BITMAP_UPLOADER_EXPORT BitmapUploader
32 : NON_EXPORTED_BASE(public mus::mojom::SurfaceClient) { 32 : NON_EXPORTED_BASE(public mus::mojom::SurfaceClient) {
33 public: 33 public:
34 explicit BitmapUploader(mus::Window* window); 34 explicit BitmapUploader(mus::Window* window);
35 ~BitmapUploader() override; 35 ~BitmapUploader() override;
36 36
37 void Init(mojo::Shell* shell); 37 void Init(mojo::Connector* connector);
38 38
39 // Sets the color which is RGBA. 39 // Sets the color which is RGBA.
40 void SetColor(uint32_t color); 40 void SetColor(uint32_t color);
41 41
42 enum Format { 42 enum Format {
43 RGBA, // Pixel layout on Android. 43 RGBA, // Pixel layout on Android.
44 BGRA, // Pixel layout everywhere else. 44 BGRA, // Pixel layout everywhere else.
45 }; 45 };
46 46
47 // Sets a bitmap. 47 // Sets a bitmap.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 uint32_t id_namespace_; 80 uint32_t id_namespace_;
81 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; 81 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_;
82 mojo::Binding<mus::mojom::SurfaceClient> surface_client_binding_; 82 mojo::Binding<mus::mojom::SurfaceClient> surface_client_binding_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); 84 DISALLOW_COPY_AND_ASSIGN(BitmapUploader);
85 }; 85 };
86 86
87 } // namespace bitmap_uploader 87 } // namespace bitmap_uploader
88 88
89 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ 89 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_mus.cc ('k') | components/bitmap_uploader/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698