| 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" |
| 11 #include "components/html_viewer/blink_settings.h" | 11 #include "components/html_viewer/blink_settings.h" |
| 12 #include "components/html_viewer/discardable_memory_allocator.h" | 12 #include "components/html_viewer/discardable_memory_allocator.h" |
| 13 #include "components/mus/gles2/mojo_gpu_memory_buffer_manager.h" | 13 #include "components/mus/gles2/mojo_gpu_memory_buffer_manager.h" |
| 14 #include "components/mus/gles2/raster_thread_helper.h" | 14 #include "components/mus/gles2/raster_thread_helper.h" |
| 15 #include "components/mus/public/interfaces/gpu.mojom.h" | 15 #include "components/mus/public/interfaces/gpu.mojom.h" |
| 16 #include "components/resource_provider/public/cpp/resource_loader.h" | 16 #include "components/resource_provider/public/cpp/resource_loader.h" |
| 17 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
| 17 #include "skia/ext/refptr.h" | 18 #include "skia/ext/refptr.h" |
| 18 #include "ui/gfx/geometry/size.h" | 19 #include "ui/gfx/geometry/size.h" |
| 19 | 20 |
| 20 namespace font_service { | 21 namespace font_service { |
| 21 class FontLoader; | 22 class FontLoader; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace mojo { | 25 namespace mojo { |
| 25 class ApplicationImpl; | 26 class ApplicationImpl; |
| 26 class Shell; | 27 class Shell; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 scoped_ptr<ui::mojo::UIInit> ui_init_; | 111 scoped_ptr<ui::mojo::UIInit> ui_init_; |
| 111 | 112 |
| 112 // Skia requires that we have one of these. Unlike the one used in chrome, | 113 // Skia requires that we have one of these. Unlike the one used in chrome, |
| 113 // this doesn't use purgable shared memory. Instead, it tries to free the | 114 // this doesn't use purgable shared memory. Instead, it tries to free the |
| 114 // oldest unlocked chunks on allocation. | 115 // oldest unlocked chunks on allocation. |
| 115 // | 116 // |
| 116 // TODO(erg): In the long run, delete this allocator and get the real shared | 117 // TODO(erg): In the long run, delete this allocator and get the real shared |
| 117 // memory based purging allocator working here. | 118 // memory based purging allocator working here. |
| 118 DiscardableMemoryAllocator discardable_memory_allocator_; | 119 DiscardableMemoryAllocator discardable_memory_allocator_; |
| 119 | 120 |
| 121 mojo::TracingImpl tracing_; |
| 122 |
| 120 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; | 123 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; |
| 121 scoped_ptr<BlinkPlatformImpl> blink_platform_; | 124 scoped_ptr<BlinkPlatformImpl> blink_platform_; |
| 122 base::Thread compositor_thread_; | 125 base::Thread compositor_thread_; |
| 123 gles2::RasterThreadHelper raster_thread_helper_; | 126 gles2::RasterThreadHelper raster_thread_helper_; |
| 124 mus::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; | 127 mus::MojoGpuMemoryBufferManager gpu_memory_buffer_manager_; |
| 125 mus::mojom::GpuPtr gpu_service_; | 128 mus::mojom::GpuPtr gpu_service_; |
| 126 mus::mojom::GpuInfoPtr gpu_info_; | 129 mus::mojom::GpuInfoPtr gpu_info_; |
| 127 scoped_ptr<MediaFactory> media_factory_; | 130 scoped_ptr<MediaFactory> media_factory_; |
| 128 | 131 |
| 129 scoped_ptr<BlinkSettings> blink_settings_; | 132 scoped_ptr<BlinkSettings> blink_settings_; |
| 130 | 133 |
| 131 #if defined(OS_LINUX) && !defined(OS_ANDROID) | 134 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| 132 skia::RefPtr<font_service::FontLoader> font_loader_; | 135 skia::RefPtr<font_service::FontLoader> font_loader_; |
| 133 #endif | 136 #endif |
| 134 | 137 |
| 135 DISALLOW_COPY_AND_ASSIGN(GlobalState); | 138 DISALLOW_COPY_AND_ASSIGN(GlobalState); |
| 136 }; | 139 }; |
| 137 | 140 |
| 138 } // namespace html_viewer | 141 } // namespace html_viewer |
| 139 | 142 |
| 140 #endif // COMPONENTS_HTML_VIEWER_GLOBAL_STATE_H_ | 143 #endif // COMPONENTS_HTML_VIEWER_GLOBAL_STATE_H_ |
| OLD | NEW |