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

Side by Side Diff: chrome/browser/views/options/cookies_view.cc

Issue 399030: Add an option to tree_view for whether to show lines from the root node... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « no previous file | views/controls/tree/tree_view.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/options/cookies_view.h" 5 #include "chrome/browser/views/options/cookies_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #include "app/gfx/color_utils.h" 10 #include "app/gfx/color_utils.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 const int single_column_layout_id = 1; 408 const int single_column_layout_id = 1;
409 column_set = layout->AddColumnSet(single_column_layout_id); 409 column_set = layout->AddColumnSet(single_column_layout_id);
410 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, 410 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1,
411 GridLayout::USE_PREF, 0, 0); 411 GridLayout::USE_PREF, 0, 0);
412 412
413 layout->StartRow(0, single_column_layout_id); 413 layout->StartRow(0, single_column_layout_id);
414 layout->AddView(description_label_); 414 layout->AddView(description_label_);
415 415
416 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 416 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
417 layout->StartRow(1, single_column_layout_id); 417 layout->StartRow(1, single_column_layout_id);
418 cookies_tree_->set_lines_at_root(true);
419 cookies_tree_->set_auto_expand_children(true);
418 layout->AddView(cookies_tree_); 420 layout->AddView(cookies_tree_);
419 cookies_tree_->ExpandAll();
420 421
421 cookies_tree_->SetController(this); 422 cookies_tree_->SetController(this);
422 423
423 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); 424 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
424 layout->StartRow(0, single_column_layout_id); 425 layout->StartRow(0, single_column_layout_id);
425 layout->AddView(info_view_); 426 layout->AddView(info_view_);
426 427
427 // Add the Remove/Remove All buttons to the ClientView 428 // Add the Remove/Remove All buttons to the ClientView
428 View* parent = GetParent(); 429 View* parent = GetParent();
429 parent->AddChildView(remove_button_); 430 parent->AddChildView(remove_button_);
430 parent->AddChildView(remove_all_button_); 431 parent->AddChildView(remove_all_button_);
431 if (!cookies_tree_model_.get()->GetRoot()->GetChildCount()) 432 if (!cookies_tree_model_.get()->GetRoot()->GetChildCount())
432 UpdateForEmptyState(); 433 UpdateForEmptyState();
433 } 434 }
434 435
435 void CookiesView::UpdateForEmptyState() { 436 void CookiesView::UpdateForEmptyState() {
436 info_view_->ClearCookieDisplay(); 437 info_view_->ClearCookieDisplay();
437 remove_button_->SetEnabled(false); 438 remove_button_->SetEnabled(false);
438 remove_all_button_->SetEnabled(false); 439 remove_all_button_->SetEnabled(false);
439 } 440 }
OLDNEW
« no previous file with comments | « no previous file | views/controls/tree/tree_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698