| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/gfx/gtk_util.h" | 10 #include "base/gfx/gtk_util.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 142 |
| 143 WindowOpenDisposition LocationBarViewGtk::GetWindowOpenDisposition() const { | 143 WindowOpenDisposition LocationBarViewGtk::GetWindowOpenDisposition() const { |
| 144 return disposition_; | 144 return disposition_; |
| 145 } | 145 } |
| 146 | 146 |
| 147 PageTransition::Type LocationBarViewGtk::GetPageTransition() const { | 147 PageTransition::Type LocationBarViewGtk::GetPageTransition() const { |
| 148 return transition_; | 148 return transition_; |
| 149 } | 149 } |
| 150 | 150 |
| 151 void LocationBarViewGtk::AcceptInput() { | 151 void LocationBarViewGtk::AcceptInput() { |
| 152 location_entry_->model()->AcceptInput(CURRENT_TAB, false); | 152 AcceptInputWithDisposition(CURRENT_TAB); |
| 153 } |
| 154 |
| 155 void LocationBarViewGtk::AcceptInputWithDisposition( |
| 156 WindowOpenDisposition disposition) { |
| 157 location_entry_->model()->AcceptInput(disposition, false); |
| 153 } | 158 } |
| 154 | 159 |
| 155 void LocationBarViewGtk::FocusLocation() { | 160 void LocationBarViewGtk::FocusLocation() { |
| 156 location_entry_->SetFocus(); | 161 location_entry_->SetFocus(); |
| 157 location_entry_->SelectAll(true); | 162 location_entry_->SelectAll(true); |
| 158 } | 163 } |
| 159 | 164 |
| 160 void LocationBarViewGtk::FocusSearch() { | 165 void LocationBarViewGtk::FocusSearch() { |
| 161 location_entry_->SetUserText(L"?"); | 166 location_entry_->SetUserText(L"?"); |
| 162 location_entry_->SetFocus(); | 167 location_entry_->SetFocus(); |
| 163 } | 168 } |
| 164 | 169 |
| 165 void LocationBarViewGtk::UpdateFeedIcon() { | 170 void LocationBarViewGtk::UpdateFeedIcon() { |
| 166 NOTIMPLEMENTED(); | 171 NOTIMPLEMENTED(); |
| 167 } | 172 } |
| 168 | 173 |
| 169 void LocationBarViewGtk::SaveStateToContents(TabContents* contents) { | 174 void LocationBarViewGtk::SaveStateToContents(TabContents* contents) { |
| 170 NOTIMPLEMENTED(); | 175 NOTIMPLEMENTED(); |
| 171 } | 176 } |
| OLD | NEW |