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

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

Issue 6865033: Made full tab file browser to open automatically when a new disk device is properly mounted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 months 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/file_manager_util.h
===================================================================
--- chrome/browser/extensions/file_manager_util.h (revision 0)
+++ chrome/browser/extensions/file_manager_util.h (revision 0)
@@ -0,0 +1,50 @@
+// 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_FILE_MANAGER_UTIL_H_
+#define CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_
+#pragma once
+
+#include "base/file_path.h"
+#include "chrome/browser/ui/shell_dialogs.h"
+#include "googleurl/src/gurl.h"
+
+class Profile;
+
+// Helper class for wiring file browser component extension with the rest of UI.
+class FileManagerUtil {
+ public:
+ // Gets base file browser url for.
+ static GURL GetFileBrowserUrlWithParams(
+ SelectFileDialog::Type type,
+ const string16& title,
+ const FilePath& default_path,
+ const SelectFileDialog::FileTypeInfo* file_types,
+ int file_type_index,
+ const FilePath::StringType& default_extension);
+
+ // Opens file browser UI in its own tab on file system location defined with
+ // |default_path|.
+ static void ShowFullTabUrl(Profile* profile,
+ const FilePath& default_path);
+
+ private:
+ FileManagerUtil() {}
+ // Helper to convert numeric dialog type to a string.
+ static std::string GetDialogTypeAsString(SelectFileDialog::Type dialog_type);
+ // Gets base file browser url.
+ static GURL GetFileBrowserUrl();
+ // Help to convert potential dialog arguments into json.
+ static std::string GetArgumentsJson(
+ SelectFileDialog::Type type,
+ const string16& title,
+ const FilePath& default_path,
+ const SelectFileDialog::FileTypeInfo* file_types,
+ int file_type_index,
+ const FilePath::StringType& default_extension);
+
+ DISALLOW_COPY_AND_ASSIGN(FileManagerUtil);
+};
+
+#endif // CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_
Property changes on: chrome/browser/extensions/file_manager_util.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/browser/chromeos/extensions/file_browser_event_router.cc ('k') | chrome/browser/extensions/file_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698