Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2591 return; | 2591 return; |
| 2592 | 2592 |
| 2593 ChildProcessSecurityPolicyImpl* policy = | 2593 ChildProcessSecurityPolicyImpl* policy = |
| 2594 ChildProcessSecurityPolicyImpl::GetInstance(); | 2594 ChildProcessSecurityPolicyImpl::GetInstance(); |
| 2595 if (policy->CanReadFile(GetRenderProcessHost()->GetID(), path)) | 2595 if (policy->CanReadFile(GetRenderProcessHost()->GetID(), path)) |
| 2596 delegate_->EnumerateDirectory(this, request_id, path); | 2596 delegate_->EnumerateDirectory(this, request_id, path); |
| 2597 } | 2597 } |
| 2598 | 2598 |
| 2599 void WebContentsImpl::OnRegisterProtocolHandler(const std::string& protocol, | 2599 void WebContentsImpl::OnRegisterProtocolHandler(const std::string& protocol, |
| 2600 const GURL& url, | 2600 const GURL& url, |
| 2601 const base::string16& title, | 2601 const base::string16&, |
|
Charlie Reis
2014/05/08 22:39:46
Style nit: Please leave the parameter name:
http:/
meacer
2014/05/09 01:16:40
Done.
| |
| 2602 bool user_gesture) { | 2602 bool user_gesture) { |
| 2603 if (!delegate_) | 2603 if (!delegate_) |
| 2604 return; | 2604 return; |
| 2605 | 2605 |
| 2606 ChildProcessSecurityPolicyImpl* policy = | 2606 ChildProcessSecurityPolicyImpl* policy = |
| 2607 ChildProcessSecurityPolicyImpl::GetInstance(); | 2607 ChildProcessSecurityPolicyImpl::GetInstance(); |
| 2608 if (policy->IsPseudoScheme(protocol)) | 2608 if (policy->IsPseudoScheme(protocol)) |
| 2609 return; | 2609 return; |
| 2610 | 2610 |
| 2611 delegate_->RegisterProtocolHandler(this, protocol, url, title, user_gesture); | 2611 delegate_->RegisterProtocolHandler(this, protocol, url, user_gesture); |
| 2612 } | 2612 } |
| 2613 | 2613 |
| 2614 void WebContentsImpl::OnFindReply(int request_id, | 2614 void WebContentsImpl::OnFindReply(int request_id, |
| 2615 int number_of_matches, | 2615 int number_of_matches, |
| 2616 const gfx::Rect& selection_rect, | 2616 const gfx::Rect& selection_rect, |
| 2617 int active_match_ordinal, | 2617 int active_match_ordinal, |
| 2618 bool final_update) { | 2618 bool final_update) { |
| 2619 if (delegate_) { | 2619 if (delegate_) { |
| 2620 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, | 2620 delegate_->FindReply(this, request_id, number_of_matches, selection_rect, |
| 2621 active_match_ordinal, final_update); | 2621 active_match_ordinal, final_update); |
| (...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3881 | 3881 |
| 3882 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { | 3882 void WebContentsImpl::OnPreferredSizeChanged(const gfx::Size& old_size) { |
| 3883 if (!delegate_) | 3883 if (!delegate_) |
| 3884 return; | 3884 return; |
| 3885 const gfx::Size new_size = GetPreferredSize(); | 3885 const gfx::Size new_size = GetPreferredSize(); |
| 3886 if (new_size != old_size) | 3886 if (new_size != old_size) |
| 3887 delegate_->UpdatePreferredSize(this, new_size); | 3887 delegate_->UpdatePreferredSize(this, new_size); |
| 3888 } | 3888 } |
| 3889 | 3889 |
| 3890 } // namespace content | 3890 } // namespace content |
| OLD | NEW |