| 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 1940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1951 bool BrowserView::MaybeShowInfoBar(TabContents* contents) { | 1951 bool BrowserView::MaybeShowInfoBar(TabContents* contents) { |
| 1952 // TODO(beng): Remove this function once the interface between | 1952 // TODO(beng): Remove this function once the interface between |
| 1953 // InfoBarContainer, DownloadShelfView and WebContents and this | 1953 // InfoBarContainer, DownloadShelfView and WebContents and this |
| 1954 // view is sorted out. | 1954 // view is sorted out. |
| 1955 return true; | 1955 return true; |
| 1956 } | 1956 } |
| 1957 | 1957 |
| 1958 void BrowserView::UpdateDevToolsForContents(TabContents* tab_contents) { | 1958 void BrowserView::UpdateDevToolsForContents(TabContents* tab_contents) { |
| 1959 WebContents* devtools_contents = NULL; | 1959 WebContents* devtools_contents = NULL; |
| 1960 if (tab_contents) { | 1960 if (tab_contents) { |
| 1961 TabContentsWrapper* devtools_tab_contents = | 1961 TabContents* devtools_tab_contents = |
| 1962 DevToolsWindow::GetDevToolsContents(tab_contents->web_contents()); | 1962 DevToolsWindow::GetDevToolsContents(tab_contents->web_contents()); |
| 1963 if (devtools_tab_contents) | 1963 if (devtools_tab_contents) |
| 1964 devtools_contents = devtools_tab_contents->web_contents(); | 1964 devtools_contents = devtools_tab_contents->web_contents(); |
| 1965 } | 1965 } |
| 1966 | 1966 |
| 1967 bool should_show = devtools_contents && !devtools_container_->visible(); | 1967 bool should_show = devtools_contents && !devtools_container_->visible(); |
| 1968 bool should_hide = !devtools_contents && devtools_container_->visible(); | 1968 bool should_hide = !devtools_contents && devtools_container_->visible(); |
| 1969 | 1969 |
| 1970 devtools_container_->SetWebContents(devtools_contents); | 1970 devtools_container_->SetWebContents(devtools_contents); |
| 1971 | 1971 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2447 this, | 2447 this, |
| 2448 tab_contents->web_contents()->GetRenderViewHost(), | 2448 tab_contents->web_contents()->GetRenderViewHost(), |
| 2449 password_generator, | 2449 password_generator, |
| 2450 browser_.get(), | 2450 browser_.get(), |
| 2451 tab_contents->password_manager()); | 2451 tab_contents->password_manager()); |
| 2452 | 2452 |
| 2453 views::BubbleDelegateView::CreateBubble(bubble); | 2453 views::BubbleDelegateView::CreateBubble(bubble); |
| 2454 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2454 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
| 2455 bubble->Show(); | 2455 bubble->Show(); |
| 2456 } | 2456 } |
| OLD | NEW |