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/search_view_controller.h" | 5 #include "chrome/browser/ui/views/search_view_controller.h" |
6 | 6 |
7 #include "chrome/browser/ui/search/search_model.h" | 7 #include "chrome/browser/ui/search/search_model.h" |
8 #include "chrome/browser/ui/search/search_tab_helper.h" | 8 #include "chrome/browser/ui/search/search_tab_helper.h" |
9 #include "chrome/browser/ui/search/search_types.h" | 9 #include "chrome/browser/ui/search/search_types.h" |
10 #include "chrome/browser/ui/search/search_ui.h" | 10 #include "chrome/browser/ui/search/search_ui.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 } | 286 } |
287 #else | 287 #else |
288 NOTIMPLEMENTED(); | 288 NOTIMPLEMENTED(); |
289 #endif | 289 #endif |
290 location_bar_container_->StackAtTop(); | 290 location_bar_container_->StackAtTop(); |
291 } | 291 } |
292 | 292 |
293 void SearchViewController::InstantReady() { | 293 void SearchViewController::InstantReady() { |
294 } | 294 } |
295 | 295 |
296 void SearchViewController::ModeChanged(const chrome::search::Mode& mode) { | 296 void SearchViewController::ModeChanged(const chrome::search::Mode& old_mode, |
| 297 const chrome::search::Mode& new_mode) { |
297 UpdateState(); | 298 UpdateState(); |
298 } | 299 } |
299 | 300 |
300 void SearchViewController::OnImplicitAnimationsCompleted() { | 301 void SearchViewController::OnImplicitAnimationsCompleted() { |
301 DCHECK_EQ(STATE_ANIMATING, state_); | 302 DCHECK_EQ(STATE_ANIMATING, state_); |
302 state_ = STATE_SEARCH; | 303 state_ = STATE_SEARCH; |
303 ntp_view_->SetVisible(false); | 304 ntp_view_->SetVisible(false); |
304 // While |ntp_view_| was fading out, location bar was animating from the | 305 // While |ntp_view_| was fading out, location bar was animating from the |
305 // middle of the NTP page to the top toolbar, at the same rate. | 306 // middle of the NTP page to the top toolbar, at the same rate. |
306 // Suggestions need to be aligned with the final location of the location bar. | 307 // Suggestions need to be aligned with the final location of the location bar. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 } | 483 } |
483 } | 484 } |
484 | 485 |
485 chrome::search::SearchModel* SearchViewController::search_model() { | 486 chrome::search::SearchModel* SearchViewController::search_model() { |
486 return tab_contents_ ? tab_contents_->search_tab_helper()->model() : NULL; | 487 return tab_contents_ ? tab_contents_->search_tab_helper()->model() : NULL; |
487 } | 488 } |
488 | 489 |
489 content::WebContents* SearchViewController::web_contents() { | 490 content::WebContents* SearchViewController::web_contents() { |
490 return tab_contents_ ? tab_contents_->web_contents() : NULL; | 491 return tab_contents_ ? tab_contents_->web_contents() : NULL; |
491 } | 492 } |
OLD | NEW |