| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/instant/instant_tab.h" | 5 #include "chrome/browser/instant/instant_tab.h" |
| 6 | 6 |
| 7 #include "chrome/browser/instant/instant_controller.h" | 7 #include "chrome/browser/instant/instant_controller.h" |
| 8 | 8 |
| 9 InstantTab::InstantTab(InstantController* controller, | 9 InstantTab::InstantTab(InstantController* controller, |
| 10 content::WebContents* contents) | 10 content::WebContents* contents) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 void InstantTab::UpOrDownKeyPressed(int count) { | 45 void InstantTab::UpOrDownKeyPressed(int count) { |
| 46 client_.UpOrDownKeyPressed(count); | 46 client_.UpOrDownKeyPressed(count); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void InstantTab::SetMarginSize(int start, int end) { | 49 void InstantTab::SetMarginSize(int start, int end) { |
| 50 client_.SetMarginSize(start, end); | 50 client_.SetMarginSize(start, end); |
| 51 } | 51 } |
| 52 | 52 |
| 53 void InstantTab::InitializeFonts() { |
| 54 client_.InitializeFonts(); |
| 55 } |
| 56 |
| 53 void InstantTab::SetSuggestions( | 57 void InstantTab::SetSuggestions( |
| 54 const std::vector<InstantSuggestion>& suggestions) { | 58 const std::vector<InstantSuggestion>& suggestions) { |
| 55 InstantSupportDetermined(true); | 59 InstantSupportDetermined(true); |
| 56 controller_->SetSuggestions(contents_, suggestions); | 60 controller_->SetSuggestions(contents_, suggestions); |
| 57 } | 61 } |
| 58 | 62 |
| 59 void InstantTab::InstantSupportDetermined(bool supports_instant) { | 63 void InstantTab::InstantSupportDetermined(bool supports_instant) { |
| 60 // If we had already determined that the page supports Instant, nothing to do. | 64 // If we had already determined that the page supports Instant, nothing to do. |
| 61 if (supports_instant_) | 65 if (supports_instant_) |
| 62 return; | 66 return; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 89 } | 93 } |
| 90 | 94 |
| 91 void InstantTab::AboutToNavigateMainFrame(const GURL& url) { | 95 void InstantTab::AboutToNavigateMainFrame(const GURL& url) { |
| 92 // The client is a committed tab, navigations will happen as expected. | 96 // The client is a committed tab, navigations will happen as expected. |
| 93 } | 97 } |
| 94 | 98 |
| 95 void InstantTab::NavigateToURL(const GURL& url, | 99 void InstantTab::NavigateToURL(const GURL& url, |
| 96 content::PageTransition transition) { | 100 content::PageTransition transition) { |
| 97 controller_->NavigateToURL(url, transition); | 101 controller_->NavigateToURL(url, transition); |
| 98 } | 102 } |
| 103 |
| 104 void InstantTab::RenderViewCreated() { |
| 105 } |
| OLD | NEW |