| 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/external_tab_container_win.h" | 5 #include "chrome/browser/external_tab_container_win.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 // If this is very early in the game then we may not have an entry. | 877 // If this is very early in the game then we may not have an entry. |
| 878 if (!entry) | 878 if (!entry) |
| 879 return false; | 879 return false; |
| 880 | 880 |
| 881 nav_info->navigation_type = nav_type; | 881 nav_info->navigation_type = nav_type; |
| 882 nav_info->relative_offset = relative_offset; | 882 nav_info->relative_offset = relative_offset; |
| 883 nav_info->navigation_index = | 883 nav_info->navigation_index = |
| 884 tab_contents_->controller().GetCurrentEntryIndex(); | 884 tab_contents_->controller().GetCurrentEntryIndex(); |
| 885 nav_info->url = entry->url(); | 885 nav_info->url = entry->url(); |
| 886 nav_info->referrer = entry->referrer(); | 886 nav_info->referrer = entry->referrer(); |
| 887 // TODO(evan): use directionality of title. | 887 nav_info->title = UTF16ToWideHack(entry->title()); |
| 888 // http://code.google.com/p/chromium/issues/detail?id=27094 | |
| 889 nav_info->title = UTF16ToWideHack(entry->title().string()); | |
| 890 if (nav_info->title.empty()) | 888 if (nav_info->title.empty()) |
| 891 nav_info->title = UTF8ToWide(nav_info->url.spec()); | 889 nav_info->title = UTF8ToWide(nav_info->url.spec()); |
| 892 | 890 |
| 893 nav_info->security_style = entry->ssl().security_style(); | 891 nav_info->security_style = entry->ssl().security_style(); |
| 894 nav_info->displayed_insecure_content = | 892 nav_info->displayed_insecure_content = |
| 895 entry->ssl().displayed_insecure_content(); | 893 entry->ssl().displayed_insecure_content(); |
| 896 nav_info->ran_insecure_content = entry->ssl().ran_insecure_content(); | 894 nav_info->ran_insecure_content = entry->ssl().ran_insecure_content(); |
| 897 return true; | 895 return true; |
| 898 } | 896 } |
| 899 | 897 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 | 1109 |
| 1112 if (disposition == CURRENT_TAB) { | 1110 if (disposition == CURRENT_TAB) { |
| 1113 DCHECK(route_all_top_level_navigations_); | 1111 DCHECK(route_all_top_level_navigations_); |
| 1114 disposition = NEW_FOREGROUND_TAB; | 1112 disposition = NEW_FOREGROUND_TAB; |
| 1115 } | 1113 } |
| 1116 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, | 1114 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, |
| 1117 transition); | 1115 transition); |
| 1118 // support only one navigation for a dummy tab before it is killed. | 1116 // support only one navigation for a dummy tab before it is killed. |
| 1119 ::DestroyWindow(GetNativeView()); | 1117 ::DestroyWindow(GetNativeView()); |
| 1120 } | 1118 } |
| OLD | NEW |