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
3 // found in the LICENSE file.
5 #ifndef CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_
6 #define CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "content/child/child_thread.h"
14 #include "content/common/content_export.h"
15 #include "content/public/utility/utility_thread.h"
22 class WebKitPlatformSupportImpl
;
24 // This class represents the background thread where the utility task runs.
25 class UtilityThreadImpl
: public UtilityThread
,
29 virtual ~UtilityThreadImpl();
30 virtual void Shutdown() OVERRIDE
;
32 virtual bool Send(IPC::Message
* msg
) OVERRIDE
;
33 virtual void ReleaseProcessIfNeeded() OVERRIDE
;
35 virtual void PreCacheFont(const LOGFONT
& log_font
) OVERRIDE
;
36 virtual void ReleaseCachedFonts() OVERRIDE
;
40 // ChildThread implementation.
41 virtual bool OnControlMessageReceived(const IPC::Message
& msg
) OVERRIDE
;
43 // IPC message handlers.
44 void OnBatchModeStarted();
45 void OnBatchModeFinished();
48 void OnLoadPlugins(const std::vector
<base::FilePath
>& plugin_paths
);
51 // True when we're running in batch mode.
54 scoped_ptr
<WebKitPlatformSupportImpl
> webkit_platform_support_
;
56 DISALLOW_COPY_AND_ASSIGN(UtilityThreadImpl
);
59 } // namespace content
61 #endif // CONTENT_UTILITY_UTILITY_THREAD_IMPL_H_