summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/file_browser_handler.h
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-16 08:49:30 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-16 08:49:30 +0000
commit99b370004f7d287d9904275255967d8e6edf1e7d (patch)
treed0a69d77ff9df70e6e587fb704bb7b40339090c4 /chrome/common/extensions/file_browser_handler.h
parent76066e5180a794b39d8f9550937b37b05f7793e8 (diff)
downloadchromium_src-99b370004f7d287d9904275255967d8e6edf1e7d.zip
chromium_src-99b370004f7d287d9904275255967d8e6edf1e7d.tar.gz
chromium_src-99b370004f7d287d9904275255967d8e6edf1e7d.tar.bz2
Revert 81865 - New fileBrowserPrivate and fileHandler APIs added + plus magic needed to safely hand over access to local file system elements from content extension to 3rd party extension.As agreed with aa@ and asargent@, this new API defines following event:chrome.fileHandler.onExecute.addListener(function(id, file_entries) {}This event is invoked when user selects files in ChromeOS file browser. The extension needs to register itself as file content hanlder with following manifest changes: ... "file_browser_actions": [ { "id" : "ActionIdentifier", "default_title" : "Action title", "default_icon" : "icon.png", "file_filters" : [ "filesystem:*.jpeg", ... ] } ... ], ...BUG=chromium-os:11996TEST=ExtensionApiTest.FileBrowserTest, ExtensionManifestTest.FileBrowserActionsReview URL: http://codereview.chromium.org/6749021
TBR=zelidrag@chromium.org Review URL: http://codereview.chromium.org/6873031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81866 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/file_browser_handler.h')
-rw-r--r--chrome/common/extensions/file_browser_handler.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/chrome/common/extensions/file_browser_handler.h b/chrome/common/extensions/file_browser_handler.h
deleted file mode 100644
index 420be17..0000000
--- a/chrome/common/extensions/file_browser_handler.h
+++ /dev/null
@@ -1,64 +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_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_
-#define CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_
-#pragma once
-
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
-#include "chrome/common/extensions/url_pattern.h"
-#include "googleurl/src/gurl.h"
-
-class URLPattern;
-
-// FileBrowserHandler encapsulates the state of a file browser action.
-class FileBrowserHandler {
- public:
- typedef std::vector<URLPattern> PatternList;
-
- FileBrowserHandler();
- ~FileBrowserHandler();
-
- // extension id
- std::string extension_id() const { return extension_id_; }
- void set_extension_id(const std::string& extension_id) {
- extension_id_ = extension_id;
- }
-
- // action id
- const std::string& id() const { return id_; }
- void set_id(const std::string& id) { id_ = id; }
-
- // default title
- const std::string& title() const { return title_; }
- void set_title(const std::string& title) { title_ = title; }
-
- // File schema URL patterns.
- const PatternList& file_url_patterns() const { return patterns_; }
- void AddPattern(const URLPattern& pattern);
- bool MatchesURL(const GURL& url) const;
- void ClearPatterns();
-
- // Action icon path.
- const std::string icon_path() const { return default_icon_path_; }
- void set_icon_path(const std::string& path) {
- default_icon_path_ = path;
- }
-
- private:
- // The id for the extension this action belongs to (as defined in the
- // extension manifest).
- std::string extension_id_;
- std::string title_;
- std::string default_icon_path_;
- // The id for the FileBrowserHandler, for example: "PdfFileAction".
- std::string id_;
- // A list of file filters.
- PatternList patterns_;
-};
-
-#endif // CHROME_COMMON_EXTENSIONS_FILE_BROWSER_HANDLER_H_