| 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 "content/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 const std::vector<FilePath>& files) { | 680 const std::vector<FilePath>& files) { |
| 681 // Grant the security access requested to the given files. | 681 // Grant the security access requested to the given files. |
| 682 for (std::vector<FilePath>::const_iterator file = files.begin(); | 682 for (std::vector<FilePath>::const_iterator file = files.begin(); |
| 683 file != files.end(); ++file) { | 683 file != files.end(); ++file) { |
| 684 ChildProcessSecurityPolicy::GetInstance()->GrantReadFile( | 684 ChildProcessSecurityPolicy::GetInstance()->GrantReadFile( |
| 685 process()->id(), *file); | 685 process()->id(), *file); |
| 686 } | 686 } |
| 687 Send(new ViewMsg_RunFileChooserResponse(routing_id(), files)); | 687 Send(new ViewMsg_RunFileChooserResponse(routing_id(), files)); |
| 688 } | 688 } |
| 689 | 689 |
| 690 void RenderViewHost::DirectoryEnumerationFinished( |
| 691 int request_id, |
| 692 const std::vector<FilePath>& files) { |
| 693 // Grant the security access requested to the given files. |
| 694 for (std::vector<FilePath>::const_iterator file = files.begin(); |
| 695 file != files.end(); ++file) { |
| 696 ChildProcessSecurityPolicy::GetInstance()->GrantReadFile( |
| 697 process()->id(), *file); |
| 698 } |
| 699 Send(new ViewMsg_EnumerateDirectoryResponse(routing_id(), |
| 700 request_id, |
| 701 files)); |
| 702 } |
| 703 |
| 690 void RenderViewHost::LoadStateChanged(const GURL& url, | 704 void RenderViewHost::LoadStateChanged(const GURL& url, |
| 691 net::LoadState load_state, | 705 net::LoadState load_state, |
| 692 uint64 upload_position, | 706 uint64 upload_position, |
| 693 uint64 upload_size) { | 707 uint64 upload_size) { |
| 694 delegate_->LoadStateChanged(url, load_state, upload_position, upload_size); | 708 delegate_->LoadStateChanged(url, load_state, upload_position, upload_size); |
| 695 } | 709 } |
| 696 | 710 |
| 697 bool RenderViewHost::SuddenTerminationAllowed() const { | 711 bool RenderViewHost::SuddenTerminationAllowed() const { |
| 698 return sudden_termination_allowed_ || process()->sudden_termination_allowed(); | 712 return sudden_termination_allowed_ || process()->sudden_termination_allowed(); |
| 699 } | 713 } |
| (...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1716 LOG(DFATAL) << "Invalid checked state " << checked_state; |
| 1703 return; | 1717 return; |
| 1704 } | 1718 } |
| 1705 | 1719 |
| 1706 CommandState state; | 1720 CommandState state; |
| 1707 state.is_enabled = is_enabled; | 1721 state.is_enabled = is_enabled; |
| 1708 state.checked_state = | 1722 state.checked_state = |
| 1709 static_cast<RenderViewCommandCheckedState>(checked_state); | 1723 static_cast<RenderViewCommandCheckedState>(checked_state); |
| 1710 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1724 command_states_[static_cast<RenderViewCommand>(command)] = state; |
| 1711 } | 1725 } |
| OLD | NEW |