summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authordhg@chromium.org <dhg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 19:41:56 +0000
committerdhg@chromium.org <dhg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 19:41:56 +0000
commit46729329047dc02f672d9d5ead5ffaf1c49552b3 (patch)
treec6dac551a3abc7a62e58dbea257848979e14bf3e /chrome/browser/dom_ui
parent365e821c6fb698c132a69d8c6bc9bc48667f4137 (diff)
downloadchromium_src-46729329047dc02f672d9d5ead5ffaf1c49552b3.zip
chromium_src-46729329047dc02f672d9d5ead5ffaf1c49552b3.tar.gz
chromium_src-46729329047dc02f672d9d5ead5ffaf1c49552b3.tar.bz2
fixing issues with filebrowser namely, namely allowing it to grow on mount, and fixing download cases so the flow is better.
BUG=none TEST=none Review URL: http://codereview.chromium.org/1527036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/filebrowse_ui.cc15
-rw-r--r--chrome/browser/dom_ui/filebrowse_ui.h10
2 files changed, 19 insertions, 6 deletions
diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc
index 8d4f874..95143b7 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.cc
+++ b/chrome/browser/dom_ui/filebrowse_ui.cc
@@ -62,8 +62,6 @@ static const std::string kPicasawebBaseUrl = "http://picasaweb.google.com/";
static const char* kFilebrowseURLHash = "chrome://filebrowse#";
static const int kPopupLeft = 0;
static const int kPopupTop = 0;
-static const int kPopupWidth = 250;
-static const int kPopupHeight = 300;
class FileBrowseUIHTMLSource : public ChromeURLDataManager::DataSource {
public:
@@ -959,7 +957,9 @@ FileBrowseUI::FileBrowseUI(TabContents* contents) : HtmlDialogUI(contents) {
// static
Browser* FileBrowseUI::OpenPopup(Profile* profile,
- const std::string& hashArgument) {
+ const std::string& hashArgument,
+ int width,
+ int height) {
// Get existing pop up for given hashArgument.
Browser* browser = GetPopupForPath(hashArgument);
@@ -975,8 +975,8 @@ Browser* FileBrowseUI::OpenPopup(Profile* profile,
true, -1, false, NULL);
browser->window()->SetBounds(gfx::Rect(kPopupLeft,
kPopupTop,
- kPopupWidth,
- kPopupHeight));
+ width,
+ height));
browser->window()->Show();
}
@@ -1001,3 +1001,8 @@ Browser* FileBrowseUI::GetPopupForPath(const std::string& path) {
return NULL;
}
+
+const int FileBrowseUI::kPopupWidth = 250;
+const int FileBrowseUI::kPopupHeight = 300;
+const int FileBrowseUI::kSmallPopupWidth = 250;
+const int FileBrowseUI::kSmallPopupHeight = 50;
diff --git a/chrome/browser/dom_ui/filebrowse_ui.h b/chrome/browser/dom_ui/filebrowse_ui.h
index c6fdc43..ce02a8f 100644
--- a/chrome/browser/dom_ui/filebrowse_ui.h
+++ b/chrome/browser/dom_ui/filebrowse_ui.h
@@ -21,9 +21,17 @@ class Profile;
class FileBrowseUI : public HtmlDialogUI {
public:
+ static const int kPopupWidth;
+ static const int kPopupHeight;
+ static const int kSmallPopupWidth;
+ static const int kSmallPopupHeight;
+
explicit FileBrowseUI(TabContents* contents);
- static Browser* OpenPopup(Profile* profile, const std::string& hashArgument);
+ static Browser* OpenPopup(Profile* profile,
+ const std::string& hashArgument,
+ int width,
+ int height);
static Browser* GetPopupForPath(const std::string& path);
private: