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

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

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
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/cpp/window_surface_client.h" 15 #include "components/mus/public/cpp/window_surface_client.h"
16 #include "components/mus/public/interfaces/compositor_frame.mojom.h" 16 #include "components/mus/public/interfaces/compositor_frame.mojom.h"
17 #include "components/mus/public/interfaces/gpu.mojom.h" 17 #include "components/mus/public/interfaces/gpu.mojom.h"
18 #include "gpu/GLES2/gl2chromium.h" 18 #include "gpu/GLES2/gl2chromium.h"
19 #include "gpu/GLES2/gl2extchromium.h" 19 #include "gpu/GLES2/gl2extchromium.h"
20 #include "mojo/public/c/gles2/gles2.h" 20 #include "mojo/public/c/gles2/gles2.h"
21 21
22 namespace mojo { 22 namespace shell {
23 class Connector; 23 class Connector;
24 } 24 }
25 25
26 namespace bitmap_uploader { 26 namespace bitmap_uploader {
27 27
28 BITMAP_UPLOADER_EXPORT extern const char kBitmapUploaderForAcceleratedWidget[]; 28 BITMAP_UPLOADER_EXPORT extern const char kBitmapUploaderForAcceleratedWidget[];
29 29
30 // BitmapUploader is useful if you want to draw a bitmap or color in a 30 // BitmapUploader is useful if you want to draw a bitmap or color in a
31 // mus::Window. 31 // mus::Window.
32 class BITMAP_UPLOADER_EXPORT BitmapUploader 32 class BITMAP_UPLOADER_EXPORT BitmapUploader
33 : public NON_EXPORTED_BASE(mus::WindowSurfaceClient) { 33 : public NON_EXPORTED_BASE(mus::WindowSurfaceClient) {
34 public: 34 public:
35 explicit BitmapUploader(mus::Window* window); 35 explicit BitmapUploader(mus::Window* window);
36 ~BitmapUploader() override; 36 ~BitmapUploader() override;
37 37
38 void Init(mojo::Connector* connector); 38 void Init(shell::Connector* connector);
39 39
40 // Sets the color which is RGBA. 40 // Sets the color which is RGBA.
41 void SetColor(uint32_t color); 41 void SetColor(uint32_t color);
42 42
43 enum Format { 43 enum Format {
44 RGBA, // Pixel layout on Android. 44 RGBA, // Pixel layout on Android.
45 BGRA, // Pixel layout everywhere else. 45 BGRA, // Pixel layout everywhere else.
46 }; 46 };
47 47
48 // Sets a bitmap. 48 // Sets a bitmap.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 uint32_t next_resource_id_; 81 uint32_t next_resource_id_;
82 uint32_t id_namespace_; 82 uint32_t id_namespace_;
83 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_; 83 base::hash_map<uint32_t, uint32_t> resource_to_texture_id_map_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(BitmapUploader); 85 DISALLOW_COPY_AND_ASSIGN(BitmapUploader);
86 }; 86 };
87 87
88 } // namespace bitmap_uploader 88 } // namespace bitmap_uploader
89 89
90 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_ 90 #endif // COMPONENTS_BITMAP_UPLOADER_BITMAP_UPLAODER_H_
OLDNEW
« no previous file with comments | « chromecast/browser/media/cast_mojo_media_application.cc ('k') | components/bitmap_uploader/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698