| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // sent at most once in a give input session, after any OnInputChanged events. | 42 // sent at most once in a give input session, after any OnInputChanged events. |
| 43 static void OnInputCancelled( | 43 static void OnInputCancelled( |
| 44 Profile* profile, const std::string& extension_id); | 44 Profile* profile, const std::string& extension_id); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxEventRouter); | 47 DISALLOW_COPY_AND_ASSIGN(ExtensionOmniboxEventRouter); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 class OmniboxSendSuggestionsFunction : public SyncExtensionFunction { | 50 class OmniboxSendSuggestionsFunction : public SyncExtensionFunction { |
| 51 public: | 51 public: |
| 52 virtual bool RunImpl(); | 52 virtual bool RunImpl() OVERRIDE; |
| 53 DECLARE_EXTENSION_FUNCTION_NAME("omnibox.sendSuggestions"); | 53 DECLARE_EXTENSION_FUNCTION_NAME("omnibox.sendSuggestions"); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 class OmniboxSetDefaultSuggestionFunction : public SyncExtensionFunction { | 56 class OmniboxSetDefaultSuggestionFunction : public SyncExtensionFunction { |
| 57 public: | 57 public: |
| 58 virtual bool RunImpl(); | 58 virtual bool RunImpl() OVERRIDE; |
| 59 DECLARE_EXTENSION_FUNCTION_NAME("omnibox.setDefaultSuggestion"); | 59 DECLARE_EXTENSION_FUNCTION_NAME("omnibox.setDefaultSuggestion"); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 struct ExtensionOmniboxSuggestion { | 62 struct ExtensionOmniboxSuggestion { |
| 63 ExtensionOmniboxSuggestion(); | 63 ExtensionOmniboxSuggestion(); |
| 64 ~ExtensionOmniboxSuggestion(); | 64 ~ExtensionOmniboxSuggestion(); |
| 65 | 65 |
| 66 // Converts a list of style ranges from the extension into the format expected | 66 // Converts a list of style ranges from the extension into the format expected |
| 67 // by the autocomplete system. | 67 // by the autocomplete system. |
| 68 bool ReadStylesFromValue(const base::ListValue& value); | 68 bool ReadStylesFromValue(const base::ListValue& value); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 98 AutocompleteMatch* match); | 98 AutocompleteMatch* match); |
| 99 | 99 |
| 100 // Launch an Extension App from |match| details provided by the Omnibox. If the | 100 // Launch an Extension App from |match| details provided by the Omnibox. If the |
| 101 // application wants to launch as a window or panel, |disposition| is ignored; | 101 // application wants to launch as a window or panel, |disposition| is ignored; |
| 102 // otherwise it's used to determine in which tab we'll launch the application. | 102 // otherwise it's used to determine in which tab we'll launch the application. |
| 103 void LaunchAppFromOmnibox(const AutocompleteMatch& match, | 103 void LaunchAppFromOmnibox(const AutocompleteMatch& match, |
| 104 Profile* profile, | 104 Profile* profile, |
| 105 WindowOpenDisposition disposition); | 105 WindowOpenDisposition disposition); |
| 106 | 106 |
| 107 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ | 107 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_OMNIBOX_API_H_ |
| OLD | NEW |