OLD | NEW |
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 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2576 } | 2576 } |
2577 | 2577 |
2578 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2578 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
2579 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2579 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
2580 if (button) | 2580 if (button) |
2581 button->ShowAvatarBubble(); | 2581 button->ShowAvatarBubble(); |
2582 } | 2582 } |
2583 | 2583 |
2584 void BrowserView::ShowPasswordGenerationBubble( | 2584 void BrowserView::ShowPasswordGenerationBubble( |
2585 const gfx::Rect& rect, | 2585 const gfx::Rect& rect, |
2586 const webkit::forms::PasswordForm& form, | 2586 const content::PasswordForm& form, |
2587 autofill::PasswordGenerator* password_generator) { | 2587 autofill::PasswordGenerator* password_generator) { |
2588 // Create a rect in the content bounds that the bubble will point to. | 2588 // Create a rect in the content bounds that the bubble will point to. |
2589 gfx::Point origin(rect.origin()); | 2589 gfx::Point origin(rect.origin()); |
2590 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); | 2590 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); |
2591 gfx::Rect bounds(origin, rect.size()); | 2591 gfx::Rect bounds(origin, rect.size()); |
2592 | 2592 |
2593 // Create the bubble. | 2593 // Create the bubble. |
2594 TabContents* tab_contents = GetActiveTabContents(); | 2594 TabContents* tab_contents = GetActiveTabContents(); |
2595 if (!tab_contents) | 2595 if (!tab_contents) |
2596 return; | 2596 return; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2642 | 2642 |
2643 Browser* modal_browser = | 2643 Browser* modal_browser = |
2644 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2644 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
2645 if (modal_browser && (browser_ != modal_browser)) { | 2645 if (modal_browser && (browser_ != modal_browser)) { |
2646 modal_browser->window()->FlashFrame(true); | 2646 modal_browser->window()->FlashFrame(true); |
2647 modal_browser->window()->Activate(); | 2647 modal_browser->window()->Activate(); |
2648 } | 2648 } |
2649 | 2649 |
2650 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2650 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2651 } | 2651 } |
OLD | NEW |