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

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

Issue 10659022: Revert 144071 - Add a regenerate button to regenerate the password in Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/password_generation_bubble_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 void BrowserView::ShowAvatarBubbleFromAvatarButton() { 2480 void BrowserView::ShowAvatarBubbleFromAvatarButton() {
2481 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); 2481 AvatarMenuButton* button = frame_->GetAvatarMenuButton();
2482 if (button) 2482 if (button)
2483 button->ShowAvatarBubble(); 2483 button->ShowAvatarBubble();
2484 } 2484 }
2485 2485
2486 void BrowserView::ShowPasswordGenerationBubble( 2486 void BrowserView::ShowPasswordGenerationBubble(
2487 const gfx::Rect& rect, 2487 const gfx::Rect& rect,
2488 autofill::PasswordGenerator* password_generator, 2488 autofill::PasswordGenerator* password_generator,
2489 const webkit::forms::PasswordForm& form) { 2489 const webkit::forms::PasswordForm& form) {
2490 ui::ThemeProvider* theme_provider = GetWidget()->GetThemeProvider();
2491
2492 // Create a rect in the content bounds that the bubble will point to. 2490 // Create a rect in the content bounds that the bubble will point to.
2493 gfx::Point origin(rect.origin()); 2491 gfx::Point origin(rect.origin());
2494 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); 2492 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin);
2495 gfx::Rect bounds(origin, rect.size()); 2493 gfx::Rect bounds(origin, rect.size());
2496 2494
2497 // Create the bubble. 2495 // Create the bubble.
2498 TabContents* tab_contents = GetActiveTabContents(); 2496 TabContents* tab_contents = GetActiveTabContents();
2499 if (!tab_contents) 2497 if (!tab_contents)
2500 return; 2498 return;
2501 2499
2502 PasswordGenerationBubbleView* bubble = 2500 PasswordGenerationBubbleView* bubble =
2503 new PasswordGenerationBubbleView( 2501 new PasswordGenerationBubbleView(
2504 bounds, 2502 bounds,
2505 form, 2503 form,
2506 this, 2504 this,
2507 tab_contents->web_contents()->GetRenderViewHost(), 2505 tab_contents->web_contents()->GetRenderViewHost(),
2508 password_generator, 2506 password_generator,
2509 browser_.get(), 2507 browser_.get(),
2510 tab_contents->password_manager(), 2508 tab_contents->password_manager());
2511 theme_provider);
2512 2509
2513 views::BubbleDelegateView::CreateBubble(bubble); 2510 views::BubbleDelegateView::CreateBubble(bubble);
2514 bubble->SetAlignment(views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); 2511 bubble->SetAlignment(views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR);
2515 bubble->Show(); 2512 bubble->Show();
2516 } 2513 }
2517 2514
2518 void BrowserView::RestackLocationBarContainer() { 2515 void BrowserView::RestackLocationBarContainer() {
2519 #if defined(USE_AURA) 2516 #if defined(USE_AURA)
2520 if (search_view_controller_.get()) 2517 if (search_view_controller_.get())
2521 search_view_controller_->StackAtTop(); 2518 search_view_controller_->StackAtTop();
2522 #endif 2519 #endif
2523 toolbar_->location_bar_container()->StackAtTop(); 2520 toolbar_->location_bar_container()->StackAtTop();
2524 } 2521 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/password_generation_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698