| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/search_ipc_router_policy_impl.h" | 5 #include "chrome/browser/ui/search/search_ipc_router_policy_impl.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/search/search.h" | 8 #include "chrome/browser/search/search.h" |
| 9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 | 65 |
| 66 bool SearchIPCRouterPolicyImpl::ShouldSendSetDisplayInstantResults() { | 66 bool SearchIPCRouterPolicyImpl::ShouldSendSetDisplayInstantResults() { |
| 67 return !is_incognito_; | 67 return !is_incognito_; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool SearchIPCRouterPolicyImpl::ShouldSendSetSuggestionToPrefetch() { | 70 bool SearchIPCRouterPolicyImpl::ShouldSendSetSuggestionToPrefetch() { |
| 71 return !is_incognito_; | 71 return !is_incognito_; |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool SearchIPCRouterPolicyImpl::ShouldSendSetOmniboxStartMargin() { | |
| 75 return true; | |
| 76 } | |
| 77 | |
| 78 bool SearchIPCRouterPolicyImpl::ShouldSendSetInputInProgress( | 74 bool SearchIPCRouterPolicyImpl::ShouldSendSetInputInProgress( |
| 79 bool is_active_tab) { | 75 bool is_active_tab) { |
| 80 return is_active_tab && !is_incognito_; | 76 return is_active_tab && !is_incognito_; |
| 81 } | 77 } |
| 82 | 78 |
| 83 bool SearchIPCRouterPolicyImpl::ShouldSendOmniboxFocusChanged() { | 79 bool SearchIPCRouterPolicyImpl::ShouldSendOmniboxFocusChanged() { |
| 84 return !is_incognito_; | 80 return !is_incognito_; |
| 85 } | 81 } |
| 86 | 82 |
| 87 bool SearchIPCRouterPolicyImpl::ShouldSendMostVisitedItems() { | 83 bool SearchIPCRouterPolicyImpl::ShouldSendMostVisitedItems() { |
| 88 return !is_incognito_ && search::IsInstantNTP(web_contents_); | 84 return !is_incognito_ && search::IsInstantNTP(web_contents_); |
| 89 } | 85 } |
| 90 | 86 |
| 91 bool SearchIPCRouterPolicyImpl::ShouldSendThemeBackgroundInfo() { | 87 bool SearchIPCRouterPolicyImpl::ShouldSendThemeBackgroundInfo() { |
| 92 return !is_incognito_ && search::IsInstantNTP(web_contents_); | 88 return !is_incognito_ && search::IsInstantNTP(web_contents_); |
| 93 } | 89 } |
| 94 | 90 |
| 95 bool SearchIPCRouterPolicyImpl::ShouldSubmitQuery() { | 91 bool SearchIPCRouterPolicyImpl::ShouldSubmitQuery() { |
| 96 return true; | 92 return true; |
| 97 } | 93 } |
| OLD | NEW |