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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_
8 #include "chrome/browser/ui/search/search_ipc_router.h"
14 // The SearchIPCRouter::Policy implementation.
15 class SearchIPCRouterPolicyImpl
: public SearchIPCRouter::Policy
{
17 explicit SearchIPCRouterPolicyImpl(const content::WebContents
* web_contents
);
18 ~SearchIPCRouterPolicyImpl() override
;
21 friend class SearchIPCRouterPolicyTest
;
23 // Overridden from SearchIPCRouter::Policy:
24 bool ShouldProcessSetVoiceSearchSupport() override
;
25 bool ShouldProcessFocusOmnibox(bool is_active_tab
) override
;
26 bool ShouldProcessNavigateToURL(bool is_active_tab
) override
;
27 bool ShouldProcessDeleteMostVisitedItem() override
;
28 bool ShouldProcessUndoMostVisitedDeletion() override
;
29 bool ShouldProcessUndoAllMostVisitedDeletions() override
;
30 bool ShouldProcessLogEvent() override
;
31 bool ShouldProcessPasteIntoOmnibox(bool is_active_tab
) override
;
32 bool ShouldProcessChromeIdentityCheck() override
;
33 bool ShouldProcessHistorySyncCheck() override
;
34 bool ShouldSendSetPromoInformation() override
;
35 bool ShouldSendSetDisplayInstantResults() override
;
36 bool ShouldSendSetSuggestionToPrefetch() override
;
37 bool ShouldSendSetOmniboxStartMargin() override
;
38 bool ShouldSendSetInputInProgress(bool is_active_tab
) override
;
39 bool ShouldSendOmniboxFocusChanged() override
;
40 bool ShouldSendMostVisitedItems() override
;
41 bool ShouldSendThemeBackgroundInfo() override
;
42 bool ShouldSendToggleVoiceSearch() override
;
43 bool ShouldSubmitQuery() override
;
45 // Used by unit tests.
46 void set_is_incognito(bool is_incognito
) {
47 is_incognito_
= is_incognito
;
50 const content::WebContents
* web_contents_
;
53 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouterPolicyImpl
);
56 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_