| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 } | 288 } |
| 289 #else | 289 #else |
| 290 NOTIMPLEMENTED(); | 290 NOTIMPLEMENTED(); |
| 291 #endif | 291 #endif |
| 292 location_bar_container_->StackAtTop(); | 292 location_bar_container_->StackAtTop(); |
| 293 } | 293 } |
| 294 | 294 |
| 295 void SearchViewController::InstantReady() { | 295 void SearchViewController::InstantReady() { |
| 296 } | 296 } |
| 297 | 297 |
| 298 void SearchViewController::ModeChanged(const chrome::search::Mode& mode) { | 298 void SearchViewController::ModeChanged(const chrome::search::Mode& old_mode, |
| 299 const chrome::search::Mode& new_mode) { |
| 299 UpdateState(); | 300 UpdateState(); |
| 300 } | 301 } |
| 301 | 302 |
| 302 void SearchViewController::OnImplicitAnimationsCompleted() { | 303 void SearchViewController::OnImplicitAnimationsCompleted() { |
| 303 DCHECK_EQ(STATE_ANIMATING, state_); | 304 DCHECK_EQ(STATE_ANIMATING, state_); |
| 304 state_ = STATE_SEARCH; | 305 state_ = STATE_SEARCH; |
| 305 ntp_view_->SetVisible(false); | 306 ntp_view_->SetVisible(false); |
| 306 // While |ntp_view_| was fading out, location bar was animating from the | 307 // While |ntp_view_| was fading out, location bar was animating from the |
| 307 // middle of the NTP page to the top toolbar, at the same rate. | 308 // middle of the NTP page to the top toolbar, at the same rate. |
| 308 // Suggestions need to be aligned with the final location of the location bar. | 309 // Suggestions need to be aligned with the final location of the location bar. |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 tab_contents_->search_tab_helper()->GetNTPWebContents()); | 489 tab_contents_->search_tab_helper()->GetNTPWebContents()); |
| 489 } | 490 } |
| 490 | 491 |
| 491 chrome::search::SearchModel* SearchViewController::search_model() { | 492 chrome::search::SearchModel* SearchViewController::search_model() { |
| 492 return tab_contents_ ? tab_contents_->search_tab_helper()->model() : NULL; | 493 return tab_contents_ ? tab_contents_->search_tab_helper()->model() : NULL; |
| 493 } | 494 } |
| 494 | 495 |
| 495 content::WebContents* SearchViewController::web_contents() { | 496 content::WebContents* SearchViewController::web_contents() { |
| 496 return tab_contents_ ? tab_contents_->web_contents() : NULL; | 497 return tab_contents_ ? tab_contents_->web_contents() : NULL; |
| 497 } | 498 } |
| OLD | NEW |