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

Side by Side Diff: chrome/browser/views/shelf_item_dialog.cc

Issue 113940: Make Textfield more portable.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | « chrome/browser/views/options/general_page_view.cc ('k') | views/controls/message_box_view.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/shelf_item_dialog.h" 5 #include "chrome/browser/views/shelf_item_dialog.h"
6 6
7 #include "app/gfx/text_elider.h" 7 #include "app/gfx/text_elider.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/gfx/png_decoder.h" 10 #include "base/gfx/png_decoder.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 447
448 views::View* ShelfItemDialog::GetContentsView() { 448 views::View* ShelfItemDialog::GetContentsView() {
449 return this; 449 return this;
450 } 450 }
451 451
452 void ShelfItemDialog::PerformModelChange() { 452 void ShelfItemDialog::PerformModelChange() {
453 DCHECK(delegate_); 453 DCHECK(delegate_);
454 GURL url(GetInputURL()); 454 GURL url(GetInputURL());
455 const std::wstring title = 455 const std::wstring title =
456 title_field_ ? title_field_->GetText() : std::wstring(); 456 title_field_ ? title_field_->text() : std::wstring();
457 delegate_->AddBookmark(this, title, url); 457 delegate_->AddBookmark(this, title, url);
458 } 458 }
459 459
460 gfx::Size ShelfItemDialog::GetPreferredSize() { 460 gfx::Size ShelfItemDialog::GetPreferredSize() {
461 return gfx::Size(views::Window::GetLocalizedContentsSize( 461 return gfx::Size(views::Window::GetLocalizedContentsSize(
462 IDS_SHELFITEM_DIALOG_WIDTH_CHARS, 462 IDS_SHELFITEM_DIALOG_WIDTH_CHARS,
463 IDS_SHELFITEM_DIALOG_HEIGHT_LINES)); 463 IDS_SHELFITEM_DIALOG_HEIGHT_LINES));
464 } 464 }
465 465
466 bool ShelfItemDialog::AcceleratorPressed( 466 bool ShelfItemDialog::AcceleratorPressed(
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 int selection = url_table_->FirstSelectedRow(); 512 int selection = url_table_->FirstSelectedRow();
513 if (selection >= 0 && selection < url_table_model_->RowCount()) { 513 if (selection >= 0 && selection < url_table_model_->RowCount()) {
514 OnSelectionChanged(); 514 OnSelectionChanged();
515 PerformModelChange(); 515 PerformModelChange();
516 if (window()) 516 if (window())
517 window()->Close(); 517 window()->Close();
518 } 518 }
519 } 519 }
520 520
521 GURL ShelfItemDialog::GetInputURL() const { 521 GURL ShelfItemDialog::GetInputURL() const {
522 return GURL(URLFixerUpper::FixupURL(url_field_->GetText(), L"")); 522 return GURL(URLFixerUpper::FixupURL(url_field_->text(), L""));
523 } 523 }
OLDNEW
« no previous file with comments | « chrome/browser/views/options/general_page_view.cc ('k') | views/controls/message_box_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698