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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 FilterURL(policy, renderer_id, &validated_params.password_form.action); | 992 FilterURL(policy, renderer_id, &validated_params.password_form.action); |
993 | 993 |
994 delegate_->DidNavigate(this, validated_params); | 994 delegate_->DidNavigate(this, validated_params); |
995 } | 995 } |
996 | 996 |
997 void RenderViewHost::OnMsgUpdateState(int32 page_id, | 997 void RenderViewHost::OnMsgUpdateState(int32 page_id, |
998 const std::string& state) { | 998 const std::string& state) { |
999 delegate_->UpdateState(this, page_id, state); | 999 delegate_->UpdateState(this, page_id, state); |
1000 } | 1000 } |
1001 | 1001 |
1002 void RenderViewHost::OnMsgUpdateTitle( | 1002 void RenderViewHost::OnMsgUpdateTitle(int32 page_id, |
1003 int32 page_id, | 1003 const std::wstring& title) { |
1004 const string16& title, | |
1005 WebKit::WebTextDirection title_direction) { | |
1006 if (title.length() > content::kMaxTitleChars) { | 1004 if (title.length() > content::kMaxTitleChars) { |
1007 NOTREACHED() << "Renderer sent too many characters in title."; | 1005 NOTREACHED() << "Renderer sent too many characters in title."; |
1008 return; | 1006 return; |
1009 } | 1007 } |
1010 base::i18n::TextDirection dir = | 1008 delegate_->UpdateTitle(this, page_id, title); |
1011 title_direction == WebKit::WebTextDirectionLeftToRight ? | |
1012 base::i18n::LEFT_TO_RIGHT : | |
1013 base::i18n::RIGHT_TO_LEFT; | |
1014 delegate_->UpdateTitle(this, page_id, | |
1015 base::i18n::String16WithDirection(title, dir)); | |
1016 } | 1009 } |
1017 | 1010 |
1018 void RenderViewHost::OnMsgUpdateEncoding(const std::string& encoding_name) { | 1011 void RenderViewHost::OnMsgUpdateEncoding(const std::string& encoding_name) { |
1019 delegate_->UpdateEncoding(this, encoding_name); | 1012 delegate_->UpdateEncoding(this, encoding_name); |
1020 } | 1013 } |
1021 | 1014 |
1022 void RenderViewHost::OnMsgUpdateTargetURL(int32 page_id, | 1015 void RenderViewHost::OnMsgUpdateTargetURL(int32 page_id, |
1023 const GURL& url) { | 1016 const GURL& url) { |
1024 delegate_->UpdateTargetURL(page_id, url); | 1017 delegate_->UpdateTargetURL(page_id, url); |
1025 | 1018 |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 LOG(DFATAL) << "Invalid checked state " << checked_state; | 1620 LOG(DFATAL) << "Invalid checked state " << checked_state; |
1628 return; | 1621 return; |
1629 } | 1622 } |
1630 | 1623 |
1631 CommandState state; | 1624 CommandState state; |
1632 state.is_enabled = is_enabled; | 1625 state.is_enabled = is_enabled; |
1633 state.checked_state = | 1626 state.checked_state = |
1634 static_cast<RenderViewCommandCheckedState>(checked_state); | 1627 static_cast<RenderViewCommandCheckedState>(checked_state); |
1635 command_states_[static_cast<RenderViewCommand>(command)] = state; | 1628 command_states_[static_cast<RenderViewCommand>(command)] = state; |
1636 } | 1629 } |
OLD | NEW |