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

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

Issue 10694060: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 439 }
440 440
441 void AvatarMenuBubbleView::ButtonPressed(views::Button* sender, 441 void AvatarMenuBubbleView::ButtonPressed(views::Button* sender,
442 const views::Event& event) { 442 const views::Event& event) {
443 for (size_t i = 0; i < item_views_.size(); ++i) { 443 for (size_t i = 0; i < item_views_.size(); ++i) {
444 ProfileItemView* item_view = static_cast<ProfileItemView*>(item_views_[i]); 444 ProfileItemView* item_view = static_cast<ProfileItemView*>(item_views_[i]);
445 if (sender == item_view) { 445 if (sender == item_view) {
446 // Clicking on the active profile shouldn't do anything. 446 // Clicking on the active profile shouldn't do anything.
447 if (!item_view->item().active) { 447 if (!item_view->item().active) {
448 avatar_menu_model_->SwitchToProfile( 448 avatar_menu_model_->SwitchToProfile(
449 i, browser::DispositionFromEventFlags(event.flags()) == NEW_WINDOW); 449 i, chrome::DispositionFromEventFlags(event.flags()) == NEW_WINDOW);
450 } 450 }
451 break; 451 break;
452 } 452 }
453 } 453 }
454 } 454 }
455 455
456 void AvatarMenuBubbleView::LinkClicked(views::Link* source, int event_flags) { 456 void AvatarMenuBubbleView::LinkClicked(views::Link* source, int event_flags) {
457 if (source == add_profile_link_) { 457 if (source == add_profile_link_) {
458 avatar_menu_model_->AddNewProfile(); 458 avatar_menu_model_->AddNewProfile();
459 return; 459 return;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 506 add_profile_link_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
507 add_profile_link_->SetBackgroundColor(color()); 507 add_profile_link_->SetBackgroundColor(color());
508 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6)); 508 add_profile_link_->SetEnabledColor(SkColorSetRGB(0xe3, 0xed, 0xf6));
509 AddChildView(add_profile_link_); 509 AddChildView(add_profile_link_);
510 510
511 // If the bubble has already been shown then resize and reposition the bubble. 511 // If the bubble has already been shown then resize and reposition the bubble.
512 Layout(); 512 Layout();
513 if (GetBubbleFrameView()) 513 if (GetBubbleFrameView())
514 SizeToContents(); 514 SizeToContents();
515 } 515 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ash/extension_utils.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