Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1962 return chrome::CanReload(this); | 1962 return chrome::CanReload(this); |
| 1963 } | 1963 } |
| 1964 | 1964 |
| 1965 bool Browser::CanSaveContents(content::WebContents* web_contents) const { | 1965 bool Browser::CanSaveContents(content::WebContents* web_contents) const { |
| 1966 return chrome::CanSavePage(this); | 1966 return chrome::CanSavePage(this); |
| 1967 } | 1967 } |
| 1968 | 1968 |
| 1969 /////////////////////////////////////////////////////////////////////////////// | 1969 /////////////////////////////////////////////////////////////////////////////// |
| 1970 // Browser, SearchTabHelperDelegate implementation: | 1970 // Browser, SearchTabHelperDelegate implementation: |
| 1971 | 1971 |
| 1972 void Browser::OnWebContentsInstantSupportDisabled( | |
| 1973 const content::WebContents* web_contents) { | |
| 1974 DCHECK(web_contents); | |
| 1975 if (tab_strip_model_->GetActiveWebContents() == web_contents) | |
| 1976 UpdateToolbar(false); | |
| 1977 } | |
| 1978 | |
| 1979 OmniboxView* Browser::GetOmniboxView() { | 1972 OmniboxView* Browser::GetOmniboxView() { |
|
Marc Treib
2017/03/08 13:34:58
This is now the only method left in SearchTabHelpe
Peter Kasting
2017/03/09 06:12:24
I'd worry about the case of dragging a tab from on
Marc Treib
2017/03/09 10:04:47
Thanks, I didn't think about that case! I'll inves
| |
| 1980 return window_->GetLocationBar()->GetOmniboxView(); | 1973 return window_->GetLocationBar()->GetOmniboxView(); |
| 1981 } | 1974 } |
| 1982 | 1975 |
| 1983 /////////////////////////////////////////////////////////////////////////////// | 1976 /////////////////////////////////////////////////////////////////////////////// |
| 1984 // Browser, web_modal::WebContentsModalDialogManagerDelegate implementation: | 1977 // Browser, web_modal::WebContentsModalDialogManagerDelegate implementation: |
| 1985 | 1978 |
| 1986 void Browser::SetWebContentsBlocked(content::WebContents* web_contents, | 1979 void Browser::SetWebContentsBlocked(content::WebContents* web_contents, |
| 1987 bool blocked) { | 1980 bool blocked) { |
| 1988 int index = tab_strip_model_->GetIndexOfWebContents(web_contents); | 1981 int index = tab_strip_model_->GetIndexOfWebContents(web_contents); |
| 1989 if (index == TabStripModel::kNoTab) { | 1982 if (index == TabStripModel::kNoTab) { |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2662 // new window later, thus we need to navigate the window now. | 2655 // new window later, thus we need to navigate the window now. |
| 2663 if (contents) { | 2656 if (contents) { |
| 2664 contents->web_contents()->GetController().LoadURL( | 2657 contents->web_contents()->GetController().LoadURL( |
| 2665 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, | 2658 target_url, content::Referrer(), ui::PAGE_TRANSITION_LINK, |
| 2666 std::string()); // No extra headers. | 2659 std::string()); // No extra headers. |
| 2667 } | 2660 } |
| 2668 } | 2661 } |
| 2669 | 2662 |
| 2670 return contents != NULL; | 2663 return contents != NULL; |
| 2671 } | 2664 } |
| OLD | NEW |