| 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 2547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2558 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); | 2558 views::View::ConvertPointToScreen(GetTabContentsContainerView(), &origin); |
| 2559 gfx::Rect bounds(origin, rect.size()); | 2559 gfx::Rect bounds(origin, rect.size()); |
| 2560 | 2560 |
| 2561 // Create the bubble. | 2561 // Create the bubble. |
| 2562 TabContents* tab_contents = GetActiveTabContents(); | 2562 TabContents* tab_contents = GetActiveTabContents(); |
| 2563 if (!tab_contents) | 2563 if (!tab_contents) |
| 2564 return; | 2564 return; |
| 2565 | 2565 |
| 2566 PasswordGenerationBubbleView* bubble = | 2566 PasswordGenerationBubbleView* bubble = |
| 2567 new PasswordGenerationBubbleView( | 2567 new PasswordGenerationBubbleView( |
| 2568 form, |
| 2568 bounds, | 2569 bounds, |
| 2569 form, | |
| 2570 this, | 2570 this, |
| 2571 tab_contents->web_contents()->GetRenderViewHost(), | 2571 tab_contents->web_contents()->GetRenderViewHost(), |
| 2572 tab_contents->password_manager(), |
| 2572 password_generator, | 2573 password_generator, |
| 2573 browser_.get(), | 2574 browser_.get(), |
| 2574 tab_contents->password_manager()); | 2575 GetWidget()->GetThemeProvider()); |
| 2575 | 2576 |
| 2576 views::BubbleDelegateView::CreateBubble(bubble); | 2577 views::BubbleDelegateView::CreateBubble(bubble); |
| 2577 bubble->SetAlignment(views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); | 2578 bubble->SetAlignment(views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR); |
| 2578 bubble->Show(); | 2579 bubble->Show(); |
| 2579 } | 2580 } |
| 2580 | 2581 |
| 2581 void BrowserView::RestackLocationBarContainer() { | 2582 void BrowserView::RestackLocationBarContainer() { |
| 2582 #if defined(USE_AURA) | 2583 #if defined(USE_AURA) |
| 2583 if (search_view_controller_.get()) | 2584 if (search_view_controller_.get()) |
| 2584 search_view_controller_->StackAtTop(); | 2585 search_view_controller_->StackAtTop(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 2609 | 2610 |
| 2610 Browser* modal_browser = | 2611 Browser* modal_browser = |
| 2611 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2612 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
| 2612 if (modal_browser && (browser_ != modal_browser)) { | 2613 if (modal_browser && (browser_ != modal_browser)) { |
| 2613 modal_browser->window()->FlashFrame(true); | 2614 modal_browser->window()->FlashFrame(true); |
| 2614 modal_browser->window()->Activate(); | 2615 modal_browser->window()->Activate(); |
| 2615 } | 2616 } |
| 2616 | 2617 |
| 2617 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2618 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2618 } | 2619 } |
| OLD | NEW |