OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/compact_nav/compact_location_bar_view.h" | 5 #include "chrome/browser/ui/views/compact_nav/compact_location_bar_view.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void CompactLocationBarView::Init() { | 103 void CompactLocationBarView::Init() { |
104 DCHECK(!initialized_); | 104 DCHECK(!initialized_); |
105 initialized_ = true; | 105 initialized_ = true; |
106 | 106 |
107 // Use a larger version of the system font. | 107 // Use a larger version of the system font. |
108 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 108 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
109 font_ = rb.GetFont(ResourceBundle::MediumFont); | 109 font_ = rb.GetFont(ResourceBundle::MediumFont); |
110 | 110 |
111 // Location bar. | 111 // Location bar. |
112 location_bar_view_ = new LocationBarView( | 112 location_bar_view_ = new LocationBarView( |
113 browser()->profile(), | |
114 browser(), | 113 browser(), |
115 browser()->toolbar_model(), | 114 browser()->toolbar_model(), |
116 clb_host(), | 115 clb_host(), |
117 LocationBarView::NORMAL); | 116 LocationBarView::NORMAL); |
118 | 117 |
119 // Reload button. | 118 // Reload button. |
120 reload_button_ = new ReloadButton(location_bar_view_, browser()); | 119 reload_button_ = new ReloadButton(location_bar_view_, browser()); |
121 reload_button_->set_triggerable_event_flags(ui::EF_LEFT_BUTTON_DOWN | | 120 reload_button_->set_triggerable_event_flags(ui::EF_LEFT_BUTTON_DOWN | |
122 ui::EF_MIDDLE_BUTTON_DOWN); | 121 ui::EF_MIDDLE_BUTTON_DOWN); |
123 reload_button_->set_tag(IDC_RELOAD); | 122 reload_button_->set_tag(IDC_RELOAD); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 | 322 |
324 InstantController* CompactLocationBarView::GetInstant() { | 323 InstantController* CompactLocationBarView::GetInstant() { |
325 // TODO(stevet): Re-enable instant for compact nav. | 324 // TODO(stevet): Re-enable instant for compact nav. |
326 // return browser()->instant(); | 325 // return browser()->instant(); |
327 return NULL; | 326 return NULL; |
328 } | 327 } |
329 | 328 |
330 TabContentsWrapper* CompactLocationBarView::GetTabContentsWrapper() const { | 329 TabContentsWrapper* CompactLocationBarView::GetTabContentsWrapper() const { |
331 return browser()->GetSelectedTabContentsWrapper(); | 330 return browser()->GetSelectedTabContentsWrapper(); |
332 } | 331 } |
OLD | NEW |