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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/bookmarks/bookmark_editor_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 url_tf_->SelectAll(true); 127 url_tf_->SelectAll(true);
128 url_tf_->RequestFocus(); 128 url_tf_->RequestFocus();
129 } 129 }
130 return false; 130 return false;
131 } 131 }
132 // Otherwise save changes and close the dialog box. 132 // Otherwise save changes and close the dialog box.
133 ApplyEdits(); 133 ApplyEdits();
134 return true; 134 return true;
135 } 135 }
136 136
137 gfx::Size BookmarkEditorView::GetPreferredSize() { 137 gfx::Size BookmarkEditorView::GetPreferredSize() const {
138 if (!show_tree_) 138 if (!show_tree_)
139 return views::View::GetPreferredSize(); 139 return views::View::GetPreferredSize();
140 140
141 return gfx::Size(views::Widget::GetLocalizedContentsSize( 141 return gfx::Size(views::Widget::GetLocalizedContentsSize(
142 IDS_EDITBOOKMARK_DIALOG_WIDTH_CHARS, 142 IDS_EDITBOOKMARK_DIALOG_WIDTH_CHARS,
143 IDS_EDITBOOKMARK_DIALOG_HEIGHT_LINES)); 143 IDS_EDITBOOKMARK_DIALOG_HEIGHT_LINES));
144 } 144 }
145 145
146 void BookmarkEditorView::OnTreeViewSelectionChanged( 146 void BookmarkEditorView::OnTreeViewSelectionChanged(
147 views::TreeView* tree_view) { 147 views::TreeView* tree_view) {
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 } 635 }
636 return context_menu_model_.get(); 636 return context_menu_model_.get();
637 } 637 }
638 638
639 void BookmarkEditorView::EditorTreeModel::SetTitle( 639 void BookmarkEditorView::EditorTreeModel::SetTitle(
640 ui::TreeModelNode* node, 640 ui::TreeModelNode* node,
641 const base::string16& title) { 641 const base::string16& title) {
642 if (!title.empty()) 642 if (!title.empty())
643 ui::TreeNodeModel<EditorNode>::SetTitle(node, title); 643 ui::TreeNodeModel<EditorNode>::SetTitle(node, title);
644 } 644 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_editor_view.h ('k') | chrome/browser/ui/views/collected_cookies_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698