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