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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 250943008: Move enum MenuAnchorPosition to reduce deps on menu_item_view.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win 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/autofill/autofill_dialog_views.h" 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 DCHECK_EQ(menu_button_, source); 532 DCHECK_EQ(menu_button_, source);
533 533
534 ui::MenuModel* model = delegate_->MenuModelForAccountChooser(); 534 ui::MenuModel* model = delegate_->MenuModelForAccountChooser();
535 if (!model) 535 if (!model)
536 return; 536 return;
537 537
538 menu_runner_.reset(new views::MenuRunner(model)); 538 menu_runner_.reset(new views::MenuRunner(model));
539 if (menu_runner_->RunMenuAt(source->GetWidget(), 539 if (menu_runner_->RunMenuAt(source->GetWidget(),
540 NULL, 540 NULL,
541 source->GetBoundsInScreen(), 541 source->GetBoundsInScreen(),
542 views::MenuItemView::TOPRIGHT, 542 ui::MENU_ANCHOR_TOPRIGHT,
543 ui::MENU_SOURCE_NONE, 543 ui::MENU_SOURCE_NONE,
544 0) == views::MenuRunner::MENU_DELETED) { 544 0) == views::MenuRunner::MENU_DELETED) {
545 return; 545 return;
546 } 546 }
547 } 547 }
548 548
549 views::View* AutofillDialogViews::GetLoadingShieldForTesting() { 549 views::View* AutofillDialogViews::GetLoadingShieldForTesting() {
550 return loading_shield_; 550 return loading_shield_;
551 } 551 }
552 552
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1750 1750
1751 group->container->SetActive(true); 1751 group->container->SetActive(true);
1752 views::Button::ButtonState state = group->suggested_button->state(); 1752 views::Button::ButtonState state = group->suggested_button->state();
1753 group->suggested_button->SetState(views::Button::STATE_PRESSED); 1753 group->suggested_button->SetState(views::Button::STATE_PRESSED);
1754 1754
1755 gfx::Rect screen_bounds = source->GetBoundsInScreen(); 1755 gfx::Rect screen_bounds = source->GetBoundsInScreen();
1756 screen_bounds.Inset(source->GetInsets()); 1756 screen_bounds.Inset(source->GetInsets());
1757 if (menu_runner_->RunMenuAt(source->GetWidget(), 1757 if (menu_runner_->RunMenuAt(source->GetWidget(),
1758 NULL, 1758 NULL,
1759 screen_bounds, 1759 screen_bounds,
1760 views::MenuItemView::TOPRIGHT, 1760 ui::MENU_ANCHOR_TOPRIGHT,
1761 ui::MENU_SOURCE_NONE, 1761 ui::MENU_SOURCE_NONE,
1762 0) == views::MenuRunner::MENU_DELETED) { 1762 0) == views::MenuRunner::MENU_DELETED) {
1763 return; 1763 return;
1764 } 1764 }
1765 1765
1766 group->container->SetActive(false); 1766 group->container->SetActive(false);
1767 group->suggested_button->SetState(state); 1767 group->suggested_button->SetState(state);
1768 } 1768 }
1769 1769
1770 gfx::Size AutofillDialogViews::CalculatePreferredSize(bool get_minimum_size) { 1770 gfx::Size AutofillDialogViews::CalculatePreferredSize(bool get_minimum_size) {
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2512 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2513 : section(section), 2513 : section(section),
2514 container(NULL), 2514 container(NULL),
2515 manual_input(NULL), 2515 manual_input(NULL),
2516 suggested_info(NULL), 2516 suggested_info(NULL),
2517 suggested_button(NULL) {} 2517 suggested_button(NULL) {}
2518 2518
2519 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2519 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2520 2520
2521 } // namespace autofill 2521 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698