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

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

Issue 11896047: Move the methods in disposition_utils.h and event_disposition.h to ui\base\window_open_disposition.… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix regex in ui.gyp Created 7 years, 11 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/avatar_menu_bubble_view.h" 5 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 513
514 void AvatarMenuBubbleView::ButtonPressed(views::Button* sender, 514 void AvatarMenuBubbleView::ButtonPressed(views::Button* sender,
515 const ui::Event& event) { 515 const ui::Event& event) {
516 for (size_t i = 0; i < item_views_.size(); ++i) { 516 for (size_t i = 0; i < item_views_.size(); ++i) {
517 ProfileItemView* item_view = static_cast<ProfileItemView*>(item_views_[i]); 517 ProfileItemView* item_view = static_cast<ProfileItemView*>(item_views_[i]);
518 if (sender == item_view) { 518 if (sender == item_view) {
519 // Clicking on the active profile shouldn't do anything. 519 // Clicking on the active profile shouldn't do anything.
520 if (!item_view->item().active) { 520 if (!item_view->item().active) {
521 avatar_menu_model_->SwitchToProfile( 521 avatar_menu_model_->SwitchToProfile(
522 i, chrome::DispositionFromEventFlags(event.flags()) == NEW_WINDOW); 522 i, ui::DispositionFromEventFlags(event.flags()) == NEW_WINDOW);
523 } 523 }
524 break; 524 break;
525 } 525 }
526 } 526 }
527 } 527 }
528 528
529 void AvatarMenuBubbleView::LinkClicked(views::Link* source, int event_flags) { 529 void AvatarMenuBubbleView::LinkClicked(views::Link* source, int event_flags) {
530 if (source == add_profile_link_) { 530 if (source == add_profile_link_) {
531 avatar_menu_model_->AddNewProfile(ProfileMetrics::ADD_NEW_USER_ICON); 531 avatar_menu_model_->AddNewProfile(ProfileMetrics::ADD_NEW_USER_ICON);
532 return; 532 return;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 add_profile_link_->set_listener(this); 583 add_profile_link_->set_listener(this);
584 add_profile_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 584 add_profile_link_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
585 add_profile_link_->SetBackgroundColor(color()); 585 add_profile_link_->SetBackgroundColor(color());
586 AddChildView(add_profile_link_); 586 AddChildView(add_profile_link_);
587 587
588 // If the bubble has already been shown then resize and reposition the bubble. 588 // If the bubble has already been shown then resize and reposition the bubble.
589 Layout(); 589 Layout();
590 if (GetBubbleFrameView()) 590 if (GetBubbleFrameView())
591 SizeToContents(); 591 SizeToContents();
592 } 592 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/accessibility/invert_bubble_view.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698