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

Side by Side Diff: chrome/browser/ui/views/collected_cookies_views.cc

Issue 2716793004: Revert of Change focus indicator for TableView and TreeView. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | ui/views/controls/scroll_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) 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/collected_cookies_views.h" 5 #include "chrome/browser/ui/views/collected_cookies_views.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h" 8 #include "chrome/browser/browsing_data/browsing_data_appcache_helper.h"
9 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h" 9 #include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h"
10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h" 10 #include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const int kInfobarVerticalPadding = 3; 57 const int kInfobarVerticalPadding = 3;
58 const int kInfobarHorizontalPadding = 8; 58 const int kInfobarHorizontalPadding = 8;
59 59
60 // Width of the infobar frame. 60 // Width of the infobar frame.
61 const int kInfobarBorderSize = 1; 61 const int kInfobarBorderSize = 1;
62 62
63 // Dimensions of the tree views. 63 // Dimensions of the tree views.
64 const int kTreeViewWidth = 400; 64 const int kTreeViewWidth = 400;
65 const int kTreeViewHeight = 125; 65 const int kTreeViewHeight = 125;
66 66
67 // The color of the border around the cookies tree view.
68 const SkColor kCookiesBorderColor = SkColorSetRGB(0xC8, 0xC8, 0xC8);
69
67 // Spacing constants used with non-Harmony dialogs. 70 // Spacing constants used with non-Harmony dialogs.
68 const int kTabbedPaneTopPadding = 14; 71 const int kTabbedPaneTopPadding = 14;
69 const int kCookieInfoBottomPadding = 4; 72 const int kCookieInfoBottomPadding = 4;
70 73
71 } // namespace 74 } // namespace
72 75
73 // A custom view that conditionally displays an infobar. 76 // A custom view that conditionally displays an infobar.
74 class InfobarView : public views::View { 77 class InfobarView : public views::View {
75 public: 78 public:
76 InfobarView() { 79 InfobarView() {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 LayoutDelegate::Metric::UNRELATED_CONTROL_VERTICAL_SPACING)); 482 LayoutDelegate::Metric::UNRELATED_CONTROL_VERTICAL_SPACING));
480 483
481 layout->StartRow(0, three_columns_layout_id); 484 layout->StartRow(0, three_columns_layout_id);
482 layout->AddView(allow_blocked_button_); 485 layout->AddView(allow_blocked_button_);
483 layout->AddView(for_session_blocked_button_); 486 layout->AddView(for_session_blocked_button_);
484 487
485 return pane; 488 return pane;
486 } 489 }
487 490
488 views::View* CollectedCookiesViews::CreateScrollView(views::TreeView* pane) { 491 views::View* CollectedCookiesViews::CreateScrollView(views::TreeView* pane) {
489 views::ScrollView* scroll_view = 492 views::ScrollView* scroll_view = new views::ScrollView();
490 views::ScrollView::CreateScrollViewWithBorder();
491 scroll_view->SetContents(pane); 493 scroll_view->SetContents(pane);
494 scroll_view->SetBorder(views::CreateSolidBorder(1, kCookiesBorderColor));
492 return scroll_view; 495 return scroll_view;
493 } 496 }
494 497
495 void CollectedCookiesViews::EnableControls() { 498 void CollectedCookiesViews::EnableControls() {
496 bool enable_allowed_buttons = false; 499 bool enable_allowed_buttons = false;
497 ui::TreeModelNode* node = allowed_cookies_tree_->GetSelectedNode(); 500 ui::TreeModelNode* node = allowed_cookies_tree_->GetSelectedNode();
498 if (node) { 501 if (node) {
499 CookieTreeNode* cookie_node = static_cast<CookieTreeNode*>(node); 502 CookieTreeNode* cookie_node = static_cast<CookieTreeNode*>(node);
500 if (cookie_node->GetDetailedInfo().node_type == 503 if (cookie_node->GetDetailedInfo().node_type ==
501 CookieTreeNode::DetailedInfo::TYPE_HOST) { 504 CookieTreeNode::DetailedInfo::TYPE_HOST) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 /////////////////////////////////////////////////////////////////////////////// 561 ///////////////////////////////////////////////////////////////////////////////
559 // CollectedCookiesViews, content::NotificationObserver implementation: 562 // CollectedCookiesViews, content::NotificationObserver implementation:
560 563
561 void CollectedCookiesViews::Observe( 564 void CollectedCookiesViews::Observe(
562 int type, 565 int type,
563 const content::NotificationSource& source, 566 const content::NotificationSource& source,
564 const content::NotificationDetails& details) { 567 const content::NotificationDetails& details) {
565 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); 568 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type);
566 GetWidget()->Close(); 569 GetWidget()->Close();
567 } 570 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/scroll_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698