| 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_SETUP_H_ | 5 #ifndef COMPONENTS_HTML_VIEWER_SETUP_H_ |
| 6 #define COMPONENTS_HTML_VIEWER_SETUP_H_ | 6 #define COMPONENTS_HTML_VIEWER_SETUP_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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 float device_pixel_ratio() const { return device_pixel_ratio_; } | 60 float device_pixel_ratio() const { return device_pixel_ratio_; } |
| 61 | 61 |
| 62 scoped_refptr<base::MessageLoopProxy> compositor_thread() { | 62 scoped_refptr<base::MessageLoopProxy> compositor_thread() { |
| 63 return compositor_thread_.message_loop_proxy(); | 63 return compositor_thread_.message_loop_proxy(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 WebMediaPlayerFactory* web_media_player_factory() { | 66 WebMediaPlayerFactory* web_media_player_factory() { |
| 67 return web_media_player_factory_.get(); | 67 return web_media_player_factory_.get(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool enable_mojo_media_renderer() { return enable_mojo_media_renderer_; } |
| 71 |
| 70 private: | 72 private: |
| 71 mojo::ApplicationImpl* app_; | 73 mojo::ApplicationImpl* app_; |
| 72 | 74 |
| 73 resource_provider::ResourceLoader resource_loader_; | 75 resource_provider::ResourceLoader resource_loader_; |
| 74 | 76 |
| 75 bool is_headless_; | 77 bool is_headless_; |
| 76 | 78 |
| 77 // True once we've completed init. | 79 // True once we've completed init. |
| 78 bool did_init_; | 80 bool did_init_; |
| 79 | 81 |
| 80 float device_pixel_ratio_; | 82 float device_pixel_ratio_; |
| 81 | 83 |
| 82 gfx::Size screen_size_in_pixels_; | 84 gfx::Size screen_size_in_pixels_; |
| 83 | 85 |
| 84 scoped_ptr<UISetup> ui_setup_; | 86 scoped_ptr<UISetup> ui_setup_; |
| 85 | 87 |
| 86 // Skia requires that we have one of these. Unlike the one used in chrome, | 88 // Skia requires that we have one of these. Unlike the one used in chrome, |
| 87 // this doesn't use purgable shared memory. Instead, it tries to free the | 89 // this doesn't use purgable shared memory. Instead, it tries to free the |
| 88 // oldest unlocked chunks on allocation. | 90 // oldest unlocked chunks on allocation. |
| 89 // | 91 // |
| 90 // TODO(erg): In the long run, delete this allocator and get the real shared | 92 // TODO(erg): In the long run, delete this allocator and get the real shared |
| 91 // memory based purging allocator working here. | 93 // memory based purging allocator working here. |
| 92 DiscardableMemoryAllocator discardable_memory_allocator_; | 94 DiscardableMemoryAllocator discardable_memory_allocator_; |
| 93 | 95 |
| 94 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; | 96 scoped_ptr<scheduler::RendererScheduler> renderer_scheduler_; |
| 95 scoped_ptr<BlinkPlatformImpl> blink_platform_; | 97 scoped_ptr<BlinkPlatformImpl> blink_platform_; |
| 96 base::Thread compositor_thread_; | 98 base::Thread compositor_thread_; |
| 99 |
| 100 bool enable_mojo_media_renderer_; |
| 97 scoped_ptr<WebMediaPlayerFactory> web_media_player_factory_; | 101 scoped_ptr<WebMediaPlayerFactory> web_media_player_factory_; |
| 98 | 102 |
| 99 DISALLOW_COPY_AND_ASSIGN(Setup); | 103 DISALLOW_COPY_AND_ASSIGN(Setup); |
| 100 }; | 104 }; |
| 101 | 105 |
| 102 } // namespace html_viewer | 106 } // namespace html_viewer |
| 103 | 107 |
| 104 #endif // COMPONENTS_HTML_VIEWER_SETUP_H_ | 108 #endif // COMPONENTS_HTML_VIEWER_SETUP_H_ |
| OLD | NEW |