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

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

Issue 2375843003: views: add Harmony dialog width support (Closed)
Patch Set: Created 4 years, 2 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
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 CollectedCookiesInfoBarDelegate::Create( 220 CollectedCookiesInfoBarDelegate::Create(
221 InfoBarService::FromWebContents(web_contents_)); 221 InfoBarService::FromWebContents(web_contents_));
222 } 222 }
223 return true; 223 return true;
224 } 224 }
225 225
226 ui::ModalType CollectedCookiesViews::GetModalType() const { 226 ui::ModalType CollectedCookiesViews::GetModalType() const {
227 return ui::MODAL_TYPE_CHILD; 227 return ui::MODAL_TYPE_CHILD;
228 } 228 }
229 229
230 views::DialogDelegate::DialogWidth
231 CollectedCookiesViews::GetDefaultDialogWidth() const {
232 return DIALOG_WIDTH_MEDIUM;
233 }
234
230 /////////////////////////////////////////////////////////////////////////////// 235 ///////////////////////////////////////////////////////////////////////////////
231 // CollectedCookiesViews, views::ButtonListener implementation: 236 // CollectedCookiesViews, views::ButtonListener implementation:
232 237
233 void CollectedCookiesViews::ButtonPressed(views::Button* sender, 238 void CollectedCookiesViews::ButtonPressed(views::Button* sender,
234 const ui::Event& event) { 239 const ui::Event& event) {
235 if (sender == block_allowed_button_) { 240 if (sender == block_allowed_button_) {
236 AddContentException(allowed_cookies_tree_, CONTENT_SETTING_BLOCK); 241 AddContentException(allowed_cookies_tree_, CONTENT_SETTING_BLOCK);
237 } else if (sender == delete_allowed_button_) { 242 } else if (sender == delete_allowed_button_) {
238 allowed_cookies_tree_model_->DeleteCookieNode( 243 allowed_cookies_tree_model_->DeleteCookieNode(
239 static_cast<CookieTreeNode*>(allowed_cookies_tree_->GetSelectedNode())); 244 static_cast<CookieTreeNode*>(allowed_cookies_tree_->GetSelectedNode()));
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 /////////////////////////////////////////////////////////////////////////////// 539 ///////////////////////////////////////////////////////////////////////////////
535 // CollectedCookiesViews, content::NotificationObserver implementation: 540 // CollectedCookiesViews, content::NotificationObserver implementation:
536 541
537 void CollectedCookiesViews::Observe( 542 void CollectedCookiesViews::Observe(
538 int type, 543 int type,
539 const content::NotificationSource& source, 544 const content::NotificationSource& source,
540 const content::NotificationDetails& details) { 545 const content::NotificationDetails& details) {
541 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type); 546 DCHECK_EQ(chrome::NOTIFICATION_COLLECTED_COOKIES_SHOWN, type);
542 GetWidget()->Close(); 547 GetWidget()->Close();
543 } 548 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698