Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / search / search_ipc_router_policy_impl.h
blob31d8584097bdfaff97b262500c5d91b4a731cfe3
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"
10 namespace content {
11 class WebContents;
14 // The SearchIPCRouter::Policy implementation.
15 class SearchIPCRouterPolicyImpl : public SearchIPCRouter::Policy {
16 public:
17 explicit SearchIPCRouterPolicyImpl(const content::WebContents* web_contents);
18 virtual ~SearchIPCRouterPolicyImpl();
20 private:
21 friend class SearchIPCRouterPolicyTest;
23 // Overridden from SearchIPCRouter::Policy:
24 virtual bool ShouldProcessSetVoiceSearchSupport() OVERRIDE;
25 virtual bool ShouldProcessFocusOmnibox(bool is_active_tab) OVERRIDE;
26 virtual bool ShouldProcessNavigateToURL(bool is_active_tab) OVERRIDE;
27 virtual bool ShouldProcessDeleteMostVisitedItem() OVERRIDE;
28 virtual bool ShouldProcessUndoMostVisitedDeletion() OVERRIDE;
29 virtual bool ShouldProcessUndoAllMostVisitedDeletions() OVERRIDE;
30 virtual bool ShouldProcessLogEvent() OVERRIDE;
31 virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) OVERRIDE;
32 virtual bool ShouldProcessChromeIdentityCheck() OVERRIDE;
33 virtual bool ShouldSendSetPromoInformation() OVERRIDE;
34 virtual bool ShouldSendSetDisplayInstantResults() OVERRIDE;
35 virtual bool ShouldSendSetSuggestionToPrefetch() OVERRIDE;
36 virtual bool ShouldSendMostVisitedItems() OVERRIDE;
37 virtual bool ShouldSendThemeBackgroundInfo() OVERRIDE;
38 virtual bool ShouldSendToggleVoiceSearch() OVERRIDE;
39 virtual bool ShouldSubmitQuery() OVERRIDE;
41 // Used by unit tests.
42 void set_is_incognito(bool is_incognito) {
43 is_incognito_ = is_incognito;
46 const content::WebContents* web_contents_;
47 bool is_incognito_;
49 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouterPolicyImpl);
52 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_