1 // Copyright (c) 2011 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 CHROME_FRAME_DELETE_CHROME_HISTORY_H_
6 #define CHROME_FRAME_DELETE_CHROME_HISTORY_H_
12 #include <deletebrowsinghistory.h>
14 #include "base/message_loop/message_loop.h"
15 #include "chrome_frame/bho.h"
16 #include "chrome_frame/chrome_frame_plugin.h"
17 #include "chrome_frame/chrome_tab.h"
18 #include "grit/chrome_frame_resources.h"
22 // DeleteChromeHistory: Implements IDeleteBrowsingHistory and
23 // pumps cache clearing operations over automation. Blocks the UI
24 // thread while operating. You have been warned.
25 class ATL_NO_VTABLE DeleteChromeHistory
26 : public CComTearOffObjectBase
<Bho
, CComSingleThreadModel
>,
27 public CWindowImpl
<DeleteChromeHistory
>,
28 public ChromeFramePlugin
<DeleteChromeHistory
>,
29 public IDeleteBrowsingHistory
{
31 DeleteChromeHistory();
32 ~DeleteChromeHistory();
34 HRESULT
FinalConstruct();
36 DECLARE_CLASSFACTORY_SINGLETON(DeleteChromeHistory
)
38 BEGIN_COM_MAP(DeleteChromeHistory
)
39 COM_INTERFACE_ENTRY(IDeleteBrowsingHistory
)
42 BEGIN_MSG_MAP(DeleteChromeHistory
)
43 CHAIN_MSG_MAP(ChromeFramePlugin
<DeleteChromeHistory
>)
46 // IDeleteBrowsingHistory methods
47 STDMETHOD(DeleteBrowsingHistory
)(DWORD flags
);
50 // ChromeFrameDelegate overrides
51 virtual void OnAutomationServerReady();
52 virtual void OnAutomationServerLaunchFailed(
53 AutomationLaunchResult reason
, const std::string
& server_version
);
55 virtual void GetProfilePath(const std::wstring
& profile_name
,
56 base::FilePath
* profile_path
);
59 unsigned long remove_mask_
;
60 base::MessageLoopForUI loop_
;
63 #endif // CHROME_FRAME_DELETE_CHROME_HISTORY_H_