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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 240453006: Fix sign-in error strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put error in button 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2362 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 } 2373 }
2374 2374
2375 void BrowserView::ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode) { 2375 void BrowserView::ShowAvatarBubbleFromAvatarButton(AvatarBubbleMode mode) {
2376 if (switches::IsNewAvatarMenu()) { 2376 if (switches::IsNewAvatarMenu()) {
2377 NewAvatarButton* button = frame_->GetNewAvatarMenuButton(); 2377 NewAvatarButton* button = frame_->GetNewAvatarMenuButton();
2378 if (button) { 2378 if (button) {
2379 gfx::Point origin; 2379 gfx::Point origin;
2380 views::View::ConvertPointToScreen(button, &origin); 2380 views::View::ConvertPointToScreen(button, &origin);
2381 gfx::Rect bounds(origin, size()); 2381 gfx::Rect bounds(origin, size());
2382 2382
2383 ProfileChooserView::BubbleViewMode view_mode = 2383 ProfileChooserView::BubbleViewMode view_mode;
2384 (mode == BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT) ? 2384 switch (mode) {
2385 ProfileChooserView::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT : 2385 case BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT:
2386 ProfileChooserView::BUBBLE_VIEW_MODE_PROFILE_CHOOSER; 2386 view_mode = ProfileChooserView::BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT;
2387 break;
2388 case AVATAR_BUBBLE_MODE_SIGNIN:
2389 view_mode = ProfileChooserView::BUBBLE_VIEW_MODE_GAIA_SIGNIN;
2390 break;
2391 case AVATAR_BUBBLE_MODE_REAUTH:
2392 view_mode = ProfileChooserView::BUBBLE_VIEW_MODE_GAIA_REAUTH;
2393 break;
2394 case AVATAR_BUBBLE_MODE_DEFAULT:
2395 view_mode = ProfileChooserView::BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
2396 break;
2397 }
2398
2387 ProfileChooserView::ShowBubble( 2399 ProfileChooserView::ShowBubble(
2388 view_mode, button, views::BubbleBorder::TOP_RIGHT, 2400 view_mode, button, views::BubbleBorder::TOP_RIGHT,
2389 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, bounds, browser()); 2401 views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, bounds, browser());
2390 } 2402 }
2391 } else { 2403 } else {
2392 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); 2404 AvatarMenuButton* button = frame_->GetAvatarMenuButton();
2393 if (button) 2405 if (button)
2394 button->ShowAvatarBubble(); 2406 button->ShowAvatarBubble();
2395 } 2407 }
2396 } 2408 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2531 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2520 gfx::Point icon_bottom( 2532 gfx::Point icon_bottom(
2521 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2533 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2522 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2534 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2523 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2535 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2524 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2536 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2525 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2537 top_arrow_height = infobar_top.y() - icon_bottom.y();
2526 } 2538 }
2527 return top_arrow_height; 2539 return top_arrow_height;
2528 } 2540 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698