| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 2410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2421 *index_result = index; | 2421 *index_result = index; |
| 2422 return *it; | 2422 return *it; |
| 2423 } | 2423 } |
| 2424 } | 2424 } |
| 2425 | 2425 |
| 2426 return NULL; | 2426 return NULL; |
| 2427 } | 2427 } |
| 2428 | 2428 |
| 2429 // static | 2429 // static |
| 2430 void Browser::RunFileChooserHelper( | 2430 void Browser::RunFileChooserHelper( |
| 2431 TabContents* tab, const ViewHostMsg_RunFileChooser_Params& params) { | 2431 TabContents* tab, const content::FileChooserParams& params) { |
| 2432 Profile* profile = | 2432 Profile* profile = |
| 2433 Profile::FromBrowserContext(tab->browser_context()); | 2433 Profile::FromBrowserContext(tab->browser_context()); |
| 2434 // FileSelectHelper adds a reference to itself and only releases it after | 2434 // FileSelectHelper adds a reference to itself and only releases it after |
| 2435 // sending the result message. It won't be destroyed when this reference | 2435 // sending the result message. It won't be destroyed when this reference |
| 2436 // goes out of scope. | 2436 // goes out of scope. |
| 2437 scoped_refptr<FileSelectHelper> file_select_helper( | 2437 scoped_refptr<FileSelectHelper> file_select_helper( |
| 2438 new FileSelectHelper(profile)); | 2438 new FileSelectHelper(profile)); |
| 2439 file_select_helper->RunFileChooser(tab->render_view_host(), tab, params); | 2439 file_select_helper->RunFileChooser(tab->render_view_host(), tab, params); |
| 2440 } | 2440 } |
| 2441 | 2441 |
| (...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3793 void Browser::DidNavigateToPendingEntry(TabContents* tab) { | 3793 void Browser::DidNavigateToPendingEntry(TabContents* tab) { |
| 3794 if (tab == GetSelectedTabContents()) | 3794 if (tab == GetSelectedTabContents()) |
| 3795 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); | 3795 UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); |
| 3796 } | 3796 } |
| 3797 | 3797 |
| 3798 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { | 3798 content::JavaScriptDialogCreator* Browser::GetJavaScriptDialogCreator() { |
| 3799 return GetJavaScriptDialogCreatorInstance(); | 3799 return GetJavaScriptDialogCreatorInstance(); |
| 3800 } | 3800 } |
| 3801 | 3801 |
| 3802 void Browser::RunFileChooser(TabContents* tab, | 3802 void Browser::RunFileChooser(TabContents* tab, |
| 3803 const ViewHostMsg_RunFileChooser_Params& params) { | 3803 const content::FileChooserParams& params) { |
| 3804 RunFileChooserHelper(tab, params); | 3804 RunFileChooserHelper(tab, params); |
| 3805 } | 3805 } |
| 3806 | 3806 |
| 3807 void Browser::EnumerateDirectory(TabContents* tab, int request_id, | 3807 void Browser::EnumerateDirectory(TabContents* tab, int request_id, |
| 3808 const FilePath& path) { | 3808 const FilePath& path) { |
| 3809 EnumerateDirectoryHelper(tab, request_id, path); | 3809 EnumerateDirectoryHelper(tab, request_id, path); |
| 3810 } | 3810 } |
| 3811 | 3811 |
| 3812 void Browser::ToggleFullscreenModeForTab(TabContents* tab, | 3812 void Browser::ToggleFullscreenModeForTab(TabContents* tab, |
| 3813 bool enter_fullscreen) { | 3813 bool enter_fullscreen) { |
| (...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5272 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); | 5272 window_->GetLocationBar()->ShowFirstRunBubble(bubble_type); |
| 5273 } else if (is_type_tabbed()) { | 5273 } else if (is_type_tabbed()) { |
| 5274 GlobalErrorService* service = | 5274 GlobalErrorService* service = |
| 5275 GlobalErrorServiceFactory::GetForProfile(profile()); | 5275 GlobalErrorServiceFactory::GetForProfile(profile()); |
| 5276 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); | 5276 GlobalError* error = service->GetFirstGlobalErrorWithBubbleView(); |
| 5277 if (error) { | 5277 if (error) { |
| 5278 error->ShowBubbleView(this); | 5278 error->ShowBubbleView(this); |
| 5279 } | 5279 } |
| 5280 } | 5280 } |
| 5281 } | 5281 } |
| OLD | NEW |