Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 6894009: Change NavigationEntry's title fields to carry the text direction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/i18n/rtl.h ('k') | chrome/browser/debugger/devtools_http_protocol_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/automation/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 } 1018 }
1019 1019
1020 void TestingAutomationProvider::GetTabTitle(int handle, 1020 void TestingAutomationProvider::GetTabTitle(int handle,
1021 int* title_string_size, 1021 int* title_string_size,
1022 std::wstring* title) { 1022 std::wstring* title) {
1023 *title_string_size = -1; // -1 is the error code 1023 *title_string_size = -1; // -1 is the error code
1024 if (tab_tracker_->ContainsHandle(handle)) { 1024 if (tab_tracker_->ContainsHandle(handle)) {
1025 NavigationController* tab = tab_tracker_->GetResource(handle); 1025 NavigationController* tab = tab_tracker_->GetResource(handle);
1026 NavigationEntry* entry = tab->GetActiveEntry(); 1026 NavigationEntry* entry = tab->GetActiveEntry();
1027 if (entry != NULL) { 1027 if (entry != NULL) {
1028 *title = UTF16ToWideHack(entry->GetTitleForDisplay("")); 1028 // TODO(evan): use directionality of title.
1029 // http://code.google.com/p/chromium/issues/detail?id=27094
1030 *title = UTF16ToWideHack(entry->GetTitleForDisplay("").string());
1029 } else { 1031 } else {
1030 *title = std::wstring(); 1032 *title = std::wstring();
1031 } 1033 }
1032 *title_string_size = static_cast<int>(title->size()); 1034 *title_string_size = static_cast<int>(title->size());
1033 } 1035 }
1034 } 1036 }
1035 1037
1036 void TestingAutomationProvider::GetTabIndex(int handle, int* tabstrip_index) { 1038 void TestingAutomationProvider::GetTabIndex(int handle, int* tabstrip_index) {
1037 *tabstrip_index = -1; // -1 is the error code 1039 *tabstrip_index = -1; // -1 is the error code
1038 1040
(...skipping 4485 matching lines...) Expand 10 before | Expand all | Expand 10 after
5524 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl); 5526 IPC::ParamTraits<std::vector<GURL> >::Write(reply_message_, redirects_gurl);
5525 5527
5526 Send(reply_message_); 5528 Send(reply_message_);
5527 redirect_query_ = 0; 5529 redirect_query_ = 0;
5528 reply_message_ = NULL; 5530 reply_message_ = NULL;
5529 } 5531 }
5530 5532
5531 void TestingAutomationProvider::OnRemoveProvider() { 5533 void TestingAutomationProvider::OnRemoveProvider() {
5532 AutomationProviderList::GetInstance()->RemoveProvider(this); 5534 AutomationProviderList::GetInstance()->RemoveProvider(this);
5533 } 5535 }
OLDNEW
« no previous file with comments | « base/i18n/rtl.h ('k') | chrome/browser/debugger/devtools_http_protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698