| OLD | NEW |
| 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/views/collected_cookies_win.h" | 5 #include "chrome/browser/ui/views/collected_cookies_win.h" |
| 6 | 6 |
| 7 #include "chrome/browser/content_settings/host_content_settings_map.h" | 7 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 8 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 9 #include "chrome/browser/cookies_tree_model.h" | 9 #include "chrome/browser/cookies_tree_model.h" |
| 10 #include "chrome/browser/infobars/infobar_tab_helper.h" | 10 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 layout->AddView(infobar_); | 233 layout->AddView(infobar_); |
| 234 | 234 |
| 235 EnableControls(); | 235 EnableControls(); |
| 236 ShowCookieInfo(); | 236 ShowCookieInfo(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 views::View* CollectedCookiesWin::CreateAllowedPane() { | 239 views::View* CollectedCookiesWin::CreateAllowedPane() { |
| 240 TabSpecificContentSettings* content_settings = wrapper_->content_settings(); | 240 TabSpecificContentSettings* content_settings = wrapper_->content_settings(); |
| 241 | 241 |
| 242 // Create the controls that go into the pane. | 242 // Create the controls that go into the pane. |
| 243 allowed_label_ = new views::Label(l10n_util::GetStringUTF16( | 243 allowed_label_ = new views::Label(UTF16ToWide(l10n_util::GetStringUTF16( |
| 244 IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL)); | 244 IDS_COLLECTED_COOKIES_ALLOWED_COOKIES_LABEL))); |
| 245 allowed_cookies_tree_model_.reset( | 245 allowed_cookies_tree_model_.reset( |
| 246 content_settings->GetAllowedCookiesTreeModel()); | 246 content_settings->GetAllowedCookiesTreeModel()); |
| 247 allowed_cookies_tree_ = new views::TreeView(); | 247 allowed_cookies_tree_ = new views::TreeView(); |
| 248 allowed_cookies_tree_->SetModel(allowed_cookies_tree_model_.get()); | 248 allowed_cookies_tree_->SetModel(allowed_cookies_tree_model_.get()); |
| 249 allowed_cookies_tree_->SetController(this); | 249 allowed_cookies_tree_->SetController(this); |
| 250 allowed_cookies_tree_->SetRootShown(false); | 250 allowed_cookies_tree_->SetRootShown(false); |
| 251 allowed_cookies_tree_->SetEditable(false); | 251 allowed_cookies_tree_->SetEditable(false); |
| 252 allowed_cookies_tree_->set_lines_at_root(true); | 252 allowed_cookies_tree_->set_lines_at_root(true); |
| 253 allowed_cookies_tree_->set_auto_expand_children(true); | 253 allowed_cookies_tree_->set_auto_expand_children(true); |
| 254 | 254 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 504 |
| 505 /////////////////////////////////////////////////////////////////////////////// | 505 /////////////////////////////////////////////////////////////////////////////// |
| 506 // NotificationObserver implementation. | 506 // NotificationObserver implementation. |
| 507 | 507 |
| 508 void CollectedCookiesWin::Observe(int type, | 508 void CollectedCookiesWin::Observe(int type, |
| 509 const NotificationSource& source, | 509 const NotificationSource& source, |
| 510 const NotificationDetails& details) { | 510 const NotificationDetails& details) { |
| 511 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); | 511 DCHECK(type == chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN); |
| 512 window_->CloseConstrainedWindow(); | 512 window_->CloseConstrainedWindow(); |
| 513 } | 513 } |
| OLD | NEW |