diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 02:45:23 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 02:45:23 +0000 |
commit | 8caadebcb838083821519861da751992401ce0fe (patch) | |
tree | 095bb4d8d456c7ec6ea4962b293064cfdd102d9f /content/public | |
parent | 017e49b850c956593bdce2d54c4ba4f88341f575 (diff) | |
download | chromium_src-8caadebcb838083821519861da751992401ce0fe.zip chromium_src-8caadebcb838083821519861da751992401ce0fe.tar.gz chromium_src-8caadebcb838083821519861da751992401ce0fe.tar.bz2 |
Get rid of view_messages.h include from chrome since TabContentsDelegate used a struct from it (ViewHostMsg_RunFileChooser_Params). Moved that to a struct in content/public/common.
BUG=98716
Review URL: http://codereview.chromium.org/8622005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r-- | content/public/common/file_chooser_params.cc | 15 | ||||
-rw-r--r-- | content/public/common/file_chooser_params.h | 53 |
2 files changed, 68 insertions, 0 deletions
diff --git a/content/public/common/file_chooser_params.cc b/content/public/common/file_chooser_params.cc new file mode 100644 index 0000000..c9c9571 --- /dev/null +++ b/content/public/common/file_chooser_params.cc @@ -0,0 +1,15 @@ +// 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. + +#include "content/public/common/file_chooser_params.h" + +namespace content { + +FileChooserParams::FileChooserParams() : mode(Open) { +} + +FileChooserParams::~FileChooserParams() { +} + +} // namespace content diff --git a/content/public/common/file_chooser_params.h b/content/public/common/file_chooser_params.h new file mode 100644 index 0000000..7088a92 --- /dev/null +++ b/content/public/common/file_chooser_params.h @@ -0,0 +1,53 @@ +// 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 CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ +#define CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ +#pragma once + +#include <vector> + +#include "base/file_path.h" +#include "base/string16.h" +#include "content/common/content_export.h" + +namespace content { + +// Struct used by TabContentsDelegate. +struct CONTENT_EXPORT FileChooserParams { + FileChooserParams(); + ~FileChooserParams(); + + enum Mode { + // Requires that the file exists before allowing the user to pick it. + Open, + + // Like Open, but allows picking multiple files to open. + OpenMultiple, + + // Like Open, but selects a folder. + OpenFolder, + + // Allows picking a nonexistent file, and prompts to overwrite if the file + // already exists. + Save, + }; + + Mode mode; + + // Title to be used for the dialog. This may be empty for the default title, + // which will be either "Open" or "Save" depending on the mode. + string16 title; + + // Default file name to select in the dialog. + FilePath default_file_name; + + // A list of valid lower-cased MIME types specified in an input element. It is + // used to restrict selectable files to such types. + std::vector<string16> accept_types; +}; + +} // namespace content + +#endif // CONTENT_PUBLIC_COMMON_FILE_CHOOSER_PARAMS_H_ |