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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 10908262: [cros] disable GDrive option on certain file pickers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: invert default in file manager Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 void Browser::OpenFile() { 807 void Browser::OpenFile() {
808 content::RecordAction(UserMetricsAction("OpenFile")); 808 content::RecordAction(UserMetricsAction("OpenFile"));
809 select_file_dialog_ = ui::SelectFileDialog::Create( 809 select_file_dialog_ = ui::SelectFileDialog::Create(
810 this, new ChromeSelectFilePolicy( 810 this, new ChromeSelectFilePolicy(
811 chrome::GetActiveWebContents(this))); 811 chrome::GetActiveWebContents(this)));
812 812
813 const FilePath directory = profile_->last_selected_directory(); 813 const FilePath directory = profile_->last_selected_directory();
814 814
815 // TODO(beng): figure out how to juggle this. 815 // TODO(beng): figure out how to juggle this.
816 gfx::NativeWindow parent_window = window_->GetNativeWindow(); 816 gfx::NativeWindow parent_window = window_->GetNativeWindow();
817 ui::SelectFileDialog::FileTypeInfo file_types;
818 file_types.support_gdata = true;
817 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE, 819 select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_OPEN_FILE,
818 string16(), directory, 820 string16(), directory,
819 NULL, 0, FILE_PATH_LITERAL(""), 821 &file_types, 0, FILE_PATH_LITERAL(""),
820 parent_window, NULL); 822 parent_window, NULL);
821 } 823 }
822 824
823 void Browser::UpdateDownloadShelfVisibility(bool visible) { 825 void Browser::UpdateDownloadShelfVisibility(bool visible) {
824 if (GetStatusBubble()) 826 if (GetStatusBubble())
825 GetStatusBubble()->UpdateDownloadShelfVisibility(visible); 827 GetStatusBubble()->UpdateDownloadShelfVisibility(visible);
826 } 828 }
827 829
828 /////////////////////////////////////////////////////////////////////////////// 830 ///////////////////////////////////////////////////////////////////////////////
829 831
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 if (contents && !allow_js_access) { 2284 if (contents && !allow_js_access) {
2283 contents->web_contents()->GetController().LoadURL( 2285 contents->web_contents()->GetController().LoadURL(
2284 target_url, 2286 target_url,
2285 content::Referrer(), 2287 content::Referrer(),
2286 content::PAGE_TRANSITION_LINK, 2288 content::PAGE_TRANSITION_LINK,
2287 std::string()); // No extra headers. 2289 std::string()); // No extra headers.
2288 } 2290 }
2289 2291
2290 return contents != NULL; 2292 return contents != NULL;
2291 } 2293 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698