| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ | 5 #ifndef CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ |
| 6 #define CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ | 6 #define CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class BlinkPlatformImpl; | 22 class BlinkPlatformImpl; |
| 23 | 23 |
| 24 // This class represents the background thread where the utility task runs. | 24 // This class represents the background thread where the utility task runs. |
| 25 class UtilityThreadImpl : public UtilityThread, | 25 class UtilityThreadImpl : public UtilityThread, |
| 26 public ChildThread { | 26 public ChildThread { |
| 27 public: | 27 public: |
| 28 UtilityThreadImpl(); | 28 UtilityThreadImpl(); |
| 29 // Constructor that's used when running in single process mode. | 29 // Constructor that's used when running in single process mode. |
| 30 explicit UtilityThreadImpl(const std::string& channel_name); | 30 explicit UtilityThreadImpl(const std::string& channel_name); |
| 31 virtual ~UtilityThreadImpl(); | 31 virtual ~UtilityThreadImpl(); |
| 32 virtual void Shutdown() OVERRIDE; | 32 virtual void Shutdown() override; |
| 33 | 33 |
| 34 virtual bool Send(IPC::Message* msg) OVERRIDE; | 34 virtual bool Send(IPC::Message* msg) override; |
| 35 virtual void ReleaseProcessIfNeeded() OVERRIDE; | 35 virtual void ReleaseProcessIfNeeded() override; |
| 36 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
| 37 virtual void PreCacheFont(const LOGFONT& log_font) OVERRIDE; | 37 virtual void PreCacheFont(const LOGFONT& log_font) override; |
| 38 virtual void ReleaseCachedFonts() OVERRIDE; | 38 virtual void ReleaseCachedFonts() override; |
| 39 #endif | 39 #endif |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 void Init(); | 42 void Init(); |
| 43 | 43 |
| 44 // ChildThread implementation. | 44 // ChildThread implementation. |
| 45 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; | 45 virtual bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 46 | 46 |
| 47 // IPC message handlers. | 47 // IPC message handlers. |
| 48 void OnBatchModeStarted(); | 48 void OnBatchModeStarted(); |
| 49 void OnBatchModeFinished(); | 49 void OnBatchModeFinished(); |
| 50 | 50 |
| 51 #if defined(OS_POSIX) && defined(ENABLE_PLUGINS) | 51 #if defined(OS_POSIX) && defined(ENABLE_PLUGINS) |
| 52 void OnLoadPlugins(const std::vector<base::FilePath>& plugin_paths); | 52 void OnLoadPlugins(const std::vector<base::FilePath>& plugin_paths); |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 // True when we're running in batch mode. | 55 // True when we're running in batch mode. |
| 56 bool batch_mode_; | 56 bool batch_mode_; |
| 57 | 57 |
| 58 // True if running in single process mode. | 58 // True if running in single process mode. |
| 59 bool single_process_; | 59 bool single_process_; |
| 60 | 60 |
| 61 scoped_ptr<BlinkPlatformImpl> blink_platform_impl_; | 61 scoped_ptr<BlinkPlatformImpl> blink_platform_impl_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl); | 63 DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace content | 66 } // namespace content |
| 67 | 67 |
| 68 #endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ | 68 #endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_ |
| OLD | NEW |