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 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2499 scoped_refptr<FileSelectHelper> file_select_helper( | 2499 scoped_refptr<FileSelectHelper> file_select_helper( |
2500 new FileSelectHelper(profile)); | 2500 new FileSelectHelper(profile)); |
2501 file_select_helper->RunFileChooser(tab->render_view_host(), tab, params); | 2501 file_select_helper->RunFileChooser(tab->render_view_host(), tab, params); |
2502 } | 2502 } |
2503 | 2503 |
2504 // static | 2504 // static |
2505 void Browser::EnumerateDirectoryHelper(TabContents* tab, int request_id, | 2505 void Browser::EnumerateDirectoryHelper(TabContents* tab, int request_id, |
2506 const FilePath& path) { | 2506 const FilePath& path) { |
2507 ChildProcessSecurityPolicy* policy = | 2507 ChildProcessSecurityPolicy* policy = |
2508 ChildProcessSecurityPolicy::GetInstance(); | 2508 ChildProcessSecurityPolicy::GetInstance(); |
2509 if (!policy->CanReadDirectory(tab->render_view_host()->process()->id(), | 2509 if (!policy->CanReadDirectory(tab->render_view_host()->process()->GetID(), |
2510 path)) { | 2510 path)) { |
2511 return; | 2511 return; |
2512 } | 2512 } |
2513 | 2513 |
2514 Profile* profile = | 2514 Profile* profile = |
2515 Profile::FromBrowserContext(tab->browser_context()); | 2515 Profile::FromBrowserContext(tab->browser_context()); |
2516 // FileSelectHelper adds a reference to itself and only releases it after | 2516 // FileSelectHelper adds a reference to itself and only releases it after |
2517 // sending the result message. It won't be destroyed when this reference | 2517 // sending the result message. It won't be destroyed when this reference |
2518 // goes out of scope. | 2518 // goes out of scope. |
2519 scoped_refptr<FileSelectHelper> file_select_helper( | 2519 scoped_refptr<FileSelectHelper> file_select_helper( |
(...skipping 2994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5514 } | 5514 } |
5515 | 5515 |
5516 void Browser::UpdateFullscreenExitBubbleContent() { | 5516 void Browser::UpdateFullscreenExitBubbleContent() { |
5517 GURL url; | 5517 GURL url; |
5518 if (fullscreened_tab_) | 5518 if (fullscreened_tab_) |
5519 url = fullscreened_tab_->tab_contents()->GetURL(); | 5519 url = fullscreened_tab_->tab_contents()->GetURL(); |
5520 | 5520 |
5521 window_->UpdateFullscreenExitBubbleContent( | 5521 window_->UpdateFullscreenExitBubbleContent( |
5522 url, GetFullscreenExitBubbleType()); | 5522 url, GetFullscreenExitBubbleType()); |
5523 } | 5523 } |
OLD | NEW |