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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "chrome/browser/favicon/favicon_tab_helper.h" | 34 #include "chrome/browser/favicon/favicon_tab_helper.h" |
35 #include "chrome/browser/instant/instant_controller.h" | 35 #include "chrome/browser/instant/instant_controller.h" |
36 #include "chrome/browser/profiles/profile.h" | 36 #include "chrome/browser/profiles/profile.h" |
37 #include "chrome/browser/search_engines/template_url.h" | 37 #include "chrome/browser/search_engines/template_url.h" |
38 #include "chrome/browser/search_engines/template_url_service.h" | 38 #include "chrome/browser/search_engines/template_url_service.h" |
39 #include "chrome/browser/search_engines/template_url_service_factory.h" | 39 #include "chrome/browser/search_engines/template_url_service_factory.h" |
40 #include "chrome/browser/ui/browser.h" | 40 #include "chrome/browser/ui/browser.h" |
41 #include "chrome/browser/ui/browser_command_controller.h" | 41 #include "chrome/browser/ui/browser_command_controller.h" |
42 #include "chrome/browser/ui/browser_commands.h" | 42 #include "chrome/browser/ui/browser_commands.h" |
43 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | 43 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" |
| 44 #include "chrome/browser/ui/browser_instant_controller.h" |
44 #include "chrome/browser/ui/browser_list.h" | 45 #include "chrome/browser/ui/browser_list.h" |
45 #include "chrome/browser/ui/browser_tabstrip.h" | 46 #include "chrome/browser/ui/browser_tabstrip.h" |
46 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 47 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
47 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" | 48 #include "chrome/browser/ui/content_settings/content_setting_image_model.h" |
48 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h" | 49 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bubble_gtk.h" |
49 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" | 50 #include "chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.h" |
50 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 51 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
51 #include "chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.h" | 52 #include "chrome/browser/ui/gtk/chrome_to_mobile_bubble_gtk.h" |
52 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h" | 53 #include "chrome/browser/ui/gtk/content_setting_bubble_gtk.h" |
53 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h" | 54 #include "chrome/browser/ui/gtk/extensions/extension_popup_gtk.h" |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 658 |
658 SkBitmap LocationBarViewGtk::GetFavicon() const { | 659 SkBitmap LocationBarViewGtk::GetFavicon() const { |
659 return GetTabContents()->favicon_tab_helper()->GetFavicon(); | 660 return GetTabContents()->favicon_tab_helper()->GetFavicon(); |
660 } | 661 } |
661 | 662 |
662 string16 LocationBarViewGtk::GetTitle() const { | 663 string16 LocationBarViewGtk::GetTitle() const { |
663 return GetWebContents()->GetTitle(); | 664 return GetWebContents()->GetTitle(); |
664 } | 665 } |
665 | 666 |
666 InstantController* LocationBarViewGtk::GetInstant() { | 667 InstantController* LocationBarViewGtk::GetInstant() { |
667 return browser_->instant(); | 668 return browser_->instant_controller()->instant(); |
668 } | 669 } |
669 | 670 |
670 TabContents* LocationBarViewGtk::GetTabContents() const { | 671 TabContents* LocationBarViewGtk::GetTabContents() const { |
671 return chrome::GetActiveTabContents(browser_); | 672 return chrome::GetActiveTabContents(browser_); |
672 } | 673 } |
673 | 674 |
674 void LocationBarViewGtk::ShowFirstRunBubble() { | 675 void LocationBarViewGtk::ShowFirstRunBubble() { |
675 // We need the browser window to be shown before we can show the bubble, but | 676 // We need the browser window to be shown before we can show the bubble, but |
676 // we get called before that's happened. | 677 // we get called before that's happened. |
677 MessageLoop::current()->PostTask( | 678 MessageLoop::current()->PostTask( |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1979 } | 1980 } |
1980 | 1981 |
1981 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( | 1982 void LocationBarViewGtk::PageActionViewGtk::InspectPopup( |
1982 ExtensionAction* action) { | 1983 ExtensionAction* action) { |
1983 ExtensionPopupGtk::Show( | 1984 ExtensionPopupGtk::Show( |
1984 action->GetPopupUrl(current_tab_id_), | 1985 action->GetPopupUrl(current_tab_id_), |
1985 owner_->browser_, | 1986 owner_->browser_, |
1986 event_box_.get(), | 1987 event_box_.get(), |
1987 ExtensionPopupGtk::SHOW_AND_INSPECT); | 1988 ExtensionPopupGtk::SHOW_AND_INSPECT); |
1988 } | 1989 } |
OLD | NEW |