summaryrefslogtreecommitdiffstats
path: root/chrome_frame/delete_chrome_history.h
diff options
context:
space:
mode:
authorslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 04:16:20 +0000
committerslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-26 04:16:20 +0000
commitbc73b4e541f57b44ac4c53df2589d91549f27eaf (patch)
tree47cf0721b0f9d9cd0a9c83196d4091120300f3a4 /chrome_frame/delete_chrome_history.h
parent46215d5ef32784db5544fc5f7ba06b6617935fec (diff)
downloadchromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.zip
chromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.tar.gz
chromium_src-bc73b4e541f57b44ac4c53df2589d91549f27eaf.tar.bz2
3rd try. *sigh*
See: http://codereview.chromium.org/858003 TBR=tommi BUG=22846 TEST=On IE 8, clear the cache entirely, watch GCF launch (via task manager) Review URL: http://codereview.chromium.org/1343004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/delete_chrome_history.h')
-rw-r--r--chrome_frame/delete_chrome_history.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/chrome_frame/delete_chrome_history.h b/chrome_frame/delete_chrome_history.h
new file mode 100644
index 0000000..947f673
--- /dev/null
+++ b/chrome_frame/delete_chrome_history.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_FRAME_DELETE_CHROME_HISTORY_H_
+#define CHROME_FRAME_DELETE_CHROME_HISTORY_H_
+
+#include <atlbase.h>
+#include <atlwin.h>
+#include <atlcom.h>
+
+#include <deletebrowsinghistory.h>
+
+#include "base/message_loop.h"
+#include "chrome_frame/bho.h"
+#include "chrome_frame/chrome_frame_plugin.h"
+#include "grit/chrome_frame_resources.h"
+
+// Include without path to make GYP build see it.
+#include "chrome_tab.h" // NOLINT
+
+class Bho;
+
+// DeleteChromeHistory: Implements IDeleteBrowsingHistory and
+// pumps cache clearing operations over automation. Blocks the UI
+// thread while operating. You have been warned.
+class ATL_NO_VTABLE DeleteChromeHistory
+ : public CComTearOffObjectBase<Bho, CComSingleThreadModel>,
+ public CWindowImpl<DeleteChromeHistory>,
+ public ChromeFramePlugin<DeleteChromeHistory>,
+ public IDeleteBrowsingHistory {
+ public:
+ DeleteChromeHistory();
+ ~DeleteChromeHistory();
+
+ HRESULT FinalConstruct();
+
+DECLARE_CLASSFACTORY_SINGLETON(DeleteChromeHistory)
+
+BEGIN_COM_MAP(DeleteChromeHistory)
+ COM_INTERFACE_ENTRY(IDeleteBrowsingHistory)
+END_COM_MAP()
+
+BEGIN_MSG_MAP(DeleteChromeHistory)
+ CHAIN_MSG_MAP(ChromeFramePlugin<DeleteChromeHistory>)
+END_MSG_MAP()
+
+ // IDeleteBrowsingHistory methods
+ STDMETHOD(DeleteBrowsingHistory)(DWORD flags);
+
+ protected:
+ // ChromeFrameDelegate overrides
+ virtual void OnAutomationServerReady();
+ virtual void OnAutomationServerLaunchFailed(
+ AutomationLaunchResult reason, const std::string& server_version);
+
+ virtual void GetProfilePath(const std::wstring& profile_name,
+ FilePath* profile_path);
+
+ private:
+ unsigned long remove_mask_;
+ MessageLoopForUI loop_;
+};
+
+#endif // CHROME_FRAME_DELETE_CHROME_HISTORY_H_