Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Unified Diff: chrome/browser/extensions/extension_save_page_api.h

Issue 8682013: Moving the MHTML API out of experimental and renaming it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more sync Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_save_page_api.h
diff --git a/chrome/browser/extensions/extension_save_page_api.h b/chrome/browser/extensions/extension_save_page_api.h
deleted file mode 100644
index fc7ce9afd4d6a2f9da2cc1a43ab3000e581fbc37..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/extension_save_page_api.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2011 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_BROWSER_EXTENSIONS_EXTENSION_SAVE_PAGE_API_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SAVE_PAGE_API_H_
-
-#include <string>
-
-#include "base/memory/ref_counted.h"
-#include "chrome/browser/extensions/extension_function.h"
-#include "content/browser/tab_contents/tab_contents_observer.h"
-#include "webkit/blob/deletable_file_reference.h"
-
-class FilePath;
-
-class SavePageAsMHTMLFunction : public AsyncExtensionFunction {
- public:
- SavePageAsMHTMLFunction();
-
- // Test specific delegate used to test that the temporary file gets deleted.
- class TestDelegate {
- public:
- // Called on the UI thread when the temporary file that contains the
- // generated data has been created.
- virtual void OnTemporaryFileCreated(const FilePath& temp_file) = 0;
- };
- static void SetTestDelegate(TestDelegate* delegate);
-
- private:
- virtual ~SavePageAsMHTMLFunction();
- virtual bool RunImpl() OVERRIDE;
- virtual bool OnMessageReceivedFromRenderView(
- const IPC::Message& message) OVERRIDE;
-
- // Called on the file thread.
- void CreateTemporaryFile();
-
- // Called on the UI thread.
- void TemporaryFileCreated(bool success);
- void ReturnFailure(const std::string& error);
- void ReturnSuccess(int64 file_size);
-
- // Callback called once the MHTML generation is done.
- void MHTMLGenerated(const FilePath& file_path, int64 mhtml_file_size);
-
- // Returns the TabContents we are associated with, NULL if it's been closed.
- TabContents* GetTabContents();
-
- int tab_id_;
-
- // The path to the temporary file containing the MHTML data.
- FilePath mhtml_path_;
-
- // The file containing the MHTML.
- scoped_refptr<webkit_blob::DeletableFileReference> mhtml_file_;
-
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.savePage.saveAsMHTML")
-};
-
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SAVE_PAGE_API_H_
« no previous file with comments | « chrome/browser/extensions/extension_page_capture_apitest.cc ('k') | chrome/browser/extensions/extension_save_page_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698