| OLD | NEW |
| 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_HTML_VIEWER_GLOBAL_STATE_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_GLOBAL_STATE_H_ |
| 6 #define COMPONENTS_HTML_VIEWER_GLOBAL_STATE_H_ | 6 #define COMPONENTS_HTML_VIEWER_GLOBAL_STATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 float device_pixel_ratio() const { return device_pixel_ratio_; } | 67 float device_pixel_ratio() const { return device_pixel_ratio_; } |
| 68 | 68 |
| 69 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread() { | 69 scoped_refptr<base::SingleThreadTaskRunner> compositor_thread() { |
| 70 return compositor_thread_.task_runner(); | 70 return compositor_thread_.task_runner(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 gles2::RasterThreadHelper* raster_thread_helper() { | 73 gles2::RasterThreadHelper* raster_thread_helper() { |
| 74 return &raster_thread_helper_; | 74 return &raster_thread_helper_; |
| 75 } | 75 } |
| 76 | 76 |
| 77 gles2::MojoGpuMemoryBufferManager* gpu_memory_buffer_manager() { | 77 mus::MojoGpuMemoryBufferManager* gpu_memory_buffer_manager() { |
| 78 return &gpu_memory_buffer_manager_; | 78 return &gpu_memory_buffer_manager_; |
| 79 } | 79 } |
| 80 | 80 |
| 81 MediaFactory* media_factory() { return media_factory_.get(); } | 81 MediaFactory* media_factory() { return media_factory_.get(); } |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 // App for HTMLViewer, not the document's app. | 84 // App for HTMLViewer, not the document's app. |
| 85 // WARNING: do not expose this. It's too easy to use the wrong one. | 85 // WARNING: do not expose this. It's too easy to use the wrong one. |
| 86 // HTMLDocument should be using the application it creates, not this one. | 86 // HTMLDocument should be using the application it creates, not this one. |
| 87 mojo::ApplicationImpl* app_; | 87 mojo::ApplicationImpl* app_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 102 // oldest unlocked chunks on allocation. | 102 // oldest unlocked chunks on allocation. |
| 103 // | 103 // |
| 104 // TODO(erg): In the long run, delete this allocator and get the real shared | 104 // TODO(erg): In the long run, delete this allocator and get the real shared |
| 105 // memory based purging allocator working here. | 105 // memory based purging allocator working here. |
| 106 DiscardableMemoryAllocator discardable_memory_allocator_; | 106 DiscardableMemoryAllocator discardable_memory_allocator_; |
| 107 | 107 |
| 108 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; | 108 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; |
| 109 scoped_ptr<BlinkPlatformImpl> blink_platform_; | 109 scoped_ptr<BlinkPlatformImpl> blink_platform_; |
| 110 base::Thread compositor_thread_; | 110 base::Thread compositor_thread_; |
| 111 gles2::RasterThreadHelper raster_thread_helper_; | 111 gles2::RasterThreadHelper raster_thread_helper_; |
| 112 gles2::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; | 112 mus::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; |
| 113 scoped_ptr<MediaFactory> media_factory_; | 113 scoped_ptr<MediaFactory> media_factory_; |
| 114 | 114 |
| 115 #if defined(OS_LINUX) && !defined(OS_ANDROID) | 115 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| 116 skia::RefPtr<font_service::FontLoader> font_loader_; | 116 skia::RefPtr<font_service::FontLoader> font_loader_; |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 DISALLOW_COPY_AND_ASSIGN(GlobalState); | 119 DISALLOW_COPY_AND_ASSIGN(GlobalState); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 } // namespace html_viewer | 122 } // namespace html_viewer |
| 123 | 123 |
| 124 #endif // COMPONENTS_HTML_VIEWER_GLOBAL_STATE_H_ | 124 #endif // COMPONENTS_HTML_VIEWER_GLOBAL_STATE_H_ |
| OLD | NEW |