Chromium Code Reviews| 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/ui/search/instant_tab.h" | 5 #include "chrome/browser/ui/search/instant_tab.h" |
| 6 #include "content/public/browser/web_contents.h" | |
| 6 | 7 |
| 7 InstantTab::InstantTab(InstantPage::Delegate* delegate) | 8 InstantTab::InstantTab(InstantPage::Delegate* delegate) |
| 8 : InstantPage(delegate) { | 9 : InstantPage(delegate) { |
| 9 } | 10 } |
| 10 | 11 |
| 11 InstantTab::~InstantTab() { | 12 InstantTab::~InstantTab() { |
| 12 } | 13 } |
| 13 | 14 |
| 14 void InstantTab::Init(content::WebContents* contents) { | 15 void InstantTab::Init(content::WebContents* contents) { |
| 15 SetContents(contents); | 16 SetContents(contents); |
| 16 DetermineIfPageSupportsInstant(); | 17 if (!contents->IsLoading()) |
|
samarth
2013/05/01 06:26:47
Can you explain why you need this change?
David Black
2013/05/02 00:49:45
If you hook up an instant tab to a page that is st
samarth
2013/05/02 03:12:56
Is this change still necessary now that you're no
David Black
2013/05/02 05:02:49
Perhaps not, but it seems like a sane check to hav
| |
| 18 DetermineIfPageSupportsInstant(); | |
| 17 } | 19 } |
| 18 | 20 |
| 19 bool InstantTab::ShouldProcessSetSuggestions() { | 21 bool InstantTab::ShouldProcessSetSuggestions() { |
| 20 return true; | 22 return true; |
| 21 } | 23 } |
| 22 | 24 |
| 23 bool InstantTab::ShouldProcessFocusOmnibox() { | 25 bool InstantTab::ShouldProcessFocusOmnibox() { |
| 24 return true; | 26 return true; |
| 25 } | 27 } |
| 26 | 28 |
| 27 bool InstantTab::ShouldProcessNavigateToURL() { | 29 bool InstantTab::ShouldProcessNavigateToURL() { |
| 28 return true; | 30 return true; |
| 29 } | 31 } |
| OLD | NEW |