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 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_ |
6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_ | 6 #define CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_ |
7 | 7 |
8 #include "chrome/browser/ui/search/search_ipc_router.h" | 8 #include "chrome/browser/ui/search/search_ipc_router.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 class WebContents; | 11 class WebContents; |
12 } | 12 } |
13 | 13 |
14 // The SearchIPCRouter::Policy implementation. | 14 // The SearchIPCRouter::Policy implementation. |
15 class SearchIPCRouterPolicyImpl : public SearchIPCRouter::Policy { | 15 class SearchIPCRouterPolicyImpl : public SearchIPCRouter::Policy { |
16 public: | 16 public: |
17 explicit SearchIPCRouterPolicyImpl(const content::WebContents* web_contents); | 17 explicit SearchIPCRouterPolicyImpl(const content::WebContents* web_contents); |
18 virtual ~SearchIPCRouterPolicyImpl(); | 18 virtual ~SearchIPCRouterPolicyImpl(); |
19 | 19 |
20 private: | 20 private: |
21 friend class SearchIPCRouterPolicyTest; | 21 friend class SearchIPCRouterPolicyTest; |
22 | 22 |
23 // Overridden from SearchIPCRouter::Policy: | 23 // Overridden from SearchIPCRouter::Policy: |
24 virtual bool ShouldProcessSetVoiceSearchSupport() OVERRIDE; | 24 virtual bool ShouldProcessSetVoiceSearchSupport() override; |
25 virtual bool ShouldProcessFocusOmnibox(bool is_active_tab) OVERRIDE; | 25 virtual bool ShouldProcessFocusOmnibox(bool is_active_tab) override; |
26 virtual bool ShouldProcessNavigateToURL(bool is_active_tab) OVERRIDE; | 26 virtual bool ShouldProcessNavigateToURL(bool is_active_tab) override; |
27 virtual bool ShouldProcessDeleteMostVisitedItem() OVERRIDE; | 27 virtual bool ShouldProcessDeleteMostVisitedItem() override; |
28 virtual bool ShouldProcessUndoMostVisitedDeletion() OVERRIDE; | 28 virtual bool ShouldProcessUndoMostVisitedDeletion() override; |
29 virtual bool ShouldProcessUndoAllMostVisitedDeletions() OVERRIDE; | 29 virtual bool ShouldProcessUndoAllMostVisitedDeletions() override; |
30 virtual bool ShouldProcessLogEvent() OVERRIDE; | 30 virtual bool ShouldProcessLogEvent() override; |
31 virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) OVERRIDE; | 31 virtual bool ShouldProcessPasteIntoOmnibox(bool is_active_tab) override; |
32 virtual bool ShouldProcessChromeIdentityCheck() OVERRIDE; | 32 virtual bool ShouldProcessChromeIdentityCheck() override; |
33 virtual bool ShouldSendSetPromoInformation() OVERRIDE; | 33 virtual bool ShouldSendSetPromoInformation() override; |
34 virtual bool ShouldSendSetDisplayInstantResults() OVERRIDE; | 34 virtual bool ShouldSendSetDisplayInstantResults() override; |
35 virtual bool ShouldSendSetSuggestionToPrefetch() OVERRIDE; | 35 virtual bool ShouldSendSetSuggestionToPrefetch() override; |
36 virtual bool ShouldSendSetOmniboxStartMargin() OVERRIDE; | 36 virtual bool ShouldSendSetOmniboxStartMargin() override; |
37 virtual bool ShouldSendSetInputInProgress(bool is_active_tab) OVERRIDE; | 37 virtual bool ShouldSendSetInputInProgress(bool is_active_tab) override; |
38 virtual bool ShouldSendOmniboxFocusChanged() OVERRIDE; | 38 virtual bool ShouldSendOmniboxFocusChanged() override; |
39 virtual bool ShouldSendMostVisitedItems() OVERRIDE; | 39 virtual bool ShouldSendMostVisitedItems() override; |
40 virtual bool ShouldSendThemeBackgroundInfo() OVERRIDE; | 40 virtual bool ShouldSendThemeBackgroundInfo() override; |
41 virtual bool ShouldSendToggleVoiceSearch() OVERRIDE; | 41 virtual bool ShouldSendToggleVoiceSearch() override; |
42 virtual bool ShouldSubmitQuery() OVERRIDE; | 42 virtual bool ShouldSubmitQuery() override; |
43 | 43 |
44 // Used by unit tests. | 44 // Used by unit tests. |
45 void set_is_incognito(bool is_incognito) { | 45 void set_is_incognito(bool is_incognito) { |
46 is_incognito_ = is_incognito; | 46 is_incognito_ = is_incognito; |
47 } | 47 } |
48 | 48 |
49 const content::WebContents* web_contents_; | 49 const content::WebContents* web_contents_; |
50 bool is_incognito_; | 50 bool is_incognito_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouterPolicyImpl); | 52 DISALLOW_COPY_AND_ASSIGN(SearchIPCRouterPolicyImpl); |
53 }; | 53 }; |
54 | 54 |
55 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_ | 55 #endif // CHROME_BROWSER_UI_SEARCH_SEARCH_IPC_ROUTER_POLICY_IMPL_H_ |
OLD | NEW |