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

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 indent 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 DCHECK_EQ(menu_button_, source); 530 DCHECK_EQ(menu_button_, source);
531 531
532 ui::MenuModel* model = delegate_->MenuModelForAccountChooser(); 532 ui::MenuModel* model = delegate_->MenuModelForAccountChooser();
533 if (!model) 533 if (!model)
534 return; 534 return;
535 535
536 menu_runner_.reset(new views::MenuRunner(model)); 536 menu_runner_.reset(new views::MenuRunner(model));
537 if (menu_runner_->RunMenuAt(source->GetWidget(), 537 if (menu_runner_->RunMenuAt(source->GetWidget(),
538 NULL, 538 NULL,
539 source->GetBoundsInScreen(), 539 source->GetBoundsInScreen(),
540 views::MenuItemView::TOPRIGHT, 540 views::MENU_ANCHOR_TOPRIGHT,
541 ui::MENU_SOURCE_NONE, 541 ui::MENU_SOURCE_NONE,
542 0) == views::MenuRunner::MENU_DELETED) { 542 0) == views::MenuRunner::MENU_DELETED) {
543 return; 543 return;
544 } 544 }
545 } 545 }
546 546
547 views::View* AutofillDialogViews::GetLoadingShieldForTesting() { 547 views::View* AutofillDialogViews::GetLoadingShieldForTesting() {
548 return loading_shield_; 548 return loading_shield_;
549 } 549 }
550 550
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1745 1745
1746 group->container->SetActive(true); 1746 group->container->SetActive(true);
1747 views::Button::ButtonState state = group->suggested_button->state(); 1747 views::Button::ButtonState state = group->suggested_button->state();
1748 group->suggested_button->SetState(views::Button::STATE_PRESSED); 1748 group->suggested_button->SetState(views::Button::STATE_PRESSED);
1749 1749
1750 gfx::Rect screen_bounds = source->GetBoundsInScreen(); 1750 gfx::Rect screen_bounds = source->GetBoundsInScreen();
1751 screen_bounds.Inset(source->GetInsets()); 1751 screen_bounds.Inset(source->GetInsets());
1752 if (menu_runner_->RunMenuAt(source->GetWidget(), 1752 if (menu_runner_->RunMenuAt(source->GetWidget(),
1753 NULL, 1753 NULL,
1754 screen_bounds, 1754 screen_bounds,
1755 views::MenuItemView::TOPRIGHT, 1755 views::MENU_ANCHOR_TOPRIGHT,
1756 ui::MENU_SOURCE_NONE, 1756 ui::MENU_SOURCE_NONE,
1757 0) == views::MenuRunner::MENU_DELETED) { 1757 0) == views::MenuRunner::MENU_DELETED) {
1758 return; 1758 return;
1759 } 1759 }
1760 1760
1761 group->container->SetActive(false); 1761 group->container->SetActive(false);
1762 group->suggested_button->SetState(state); 1762 group->suggested_button->SetState(state);
1763 } 1763 }
1764 1764
1765 gfx::Size AutofillDialogViews::CalculatePreferredSize(bool get_minimum_size) { 1765 gfx::Size AutofillDialogViews::CalculatePreferredSize(bool get_minimum_size) {
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2507 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2508 : section(section), 2508 : section(section),
2509 container(NULL), 2509 container(NULL),
2510 manual_input(NULL), 2510 manual_input(NULL),
2511 suggested_info(NULL), 2511 suggested_info(NULL),
2512 suggested_button(NULL) {} 2512 suggested_button(NULL) {}
2513 2513
2514 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2514 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2515 2515
2516 } // namespace autofill 2516 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698