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

Side by Side Diff: chrome/browser/ui/browser.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
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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 4354 matching lines...) Expand 10 before | Expand all | Expand 10 after
4365 4365
4366 GURL view_source_url = GURL(chrome::kViewSourceScheme + std::string(":") + 4366 GURL view_source_url = GURL(chrome::kViewSourceScheme + std::string(":") +
4367 url.spec()); 4367 url.spec());
4368 active_entry->set_virtual_url(view_source_url); 4368 active_entry->set_virtual_url(view_source_url);
4369 4369
4370 // Do not restore scroller position. 4370 // Do not restore scroller position.
4371 active_entry->set_content_state( 4371 active_entry->set_content_state(
4372 webkit_glue::RemoveScrollOffsetFromHistoryState(content_state)); 4372 webkit_glue::RemoveScrollOffsetFromHistoryState(content_state));
4373 4373
4374 // Do not restore title, derive it from the url. 4374 // Do not restore title, derive it from the url.
4375 active_entry->set_title(string16()); 4375 active_entry->set_title(base::i18n::String16WithDirection());
4376 4376
4377 // Now show view-source entry. 4377 // Now show view-source entry.
4378 if (CanSupportWindowFeature(FEATURE_TABSTRIP)) { 4378 if (CanSupportWindowFeature(FEATURE_TABSTRIP)) {
4379 // If this is a tabbed browser, just create a duplicate tab inside the same 4379 // If this is a tabbed browser, just create a duplicate tab inside the same
4380 // window next to the tab being duplicated. 4380 // window next to the tab being duplicated.
4381 int index = tab_handler_->GetTabStripModel()-> 4381 int index = tab_handler_->GetTabStripModel()->
4382 GetIndexOfTabContents(contents); 4382 GetIndexOfTabContents(contents);
4383 int add_types = TabStripModel::ADD_ACTIVE | 4383 int add_types = TabStripModel::ADD_ACTIVE |
4384 TabStripModel::ADD_INHERIT_GROUP; 4384 TabStripModel::ADD_INHERIT_GROUP;
4385 tab_handler_->GetTabStripModel()->InsertTabContentsAt(index + 1, 4385 tab_handler_->GetTabStripModel()->InsertTabContentsAt(index + 1,
(...skipping 28 matching lines...) Expand all
4414 TabContents* current_tab = GetSelectedTabContents(); 4414 TabContents* current_tab = GetSelectedTabContents();
4415 if (current_tab) { 4415 if (current_tab) {
4416 content_restrictions = current_tab->content_restrictions(); 4416 content_restrictions = current_tab->content_restrictions();
4417 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4417 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4418 // See comment in UpdateCommandsForTabState about why we call url(). 4418 // See comment in UpdateCommandsForTabState about why we call url().
4419 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4419 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4420 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4420 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4421 } 4421 }
4422 return content_restrictions; 4422 return content_restrictions;
4423 } 4423 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_types.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698