| 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_HOST_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 // Const version of below function. | 226 // Const version of below function. |
| 227 const Browser* GetBrowser() const; | 227 const Browser* GetBrowser() const; |
| 228 | 228 |
| 229 // ExtensionFunctionDispatcher::Delegate | 229 // ExtensionFunctionDispatcher::Delegate |
| 230 virtual Browser* GetBrowser(); | 230 virtual Browser* GetBrowser(); |
| 231 virtual gfx::NativeView GetNativeViewOfHost(); | 231 virtual gfx::NativeView GetNativeViewOfHost(); |
| 232 | 232 |
| 233 // Message handlers. | 233 // Message handlers. |
| 234 void OnRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); | 234 void OnRunFileChooser(const ViewHostMsg_RunFileChooser_Params& params); |
| 235 void OnPostMessage(int port_id, const std::string& message); |
| 235 | 236 |
| 236 // Handles keyboard events that were not handled by HandleKeyboardEvent(). | 237 // Handles keyboard events that were not handled by HandleKeyboardEvent(). |
| 237 // Platform specific implementation may override this method to handle the | 238 // Platform specific implementation may override this method to handle the |
| 238 // event in platform specific way. | 239 // event in platform specific way. |
| 239 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {} | 240 virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event) {} |
| 240 | 241 |
| 241 // Returns true if we're hosting a background page. | 242 // Returns true if we're hosting a background page. |
| 242 // This isn't valid until CreateRenderView is called. | 243 // This isn't valid until CreateRenderView is called. |
| 243 bool is_background_page() const { return !view(); } | 244 bool is_background_page() const { return !view(); } |
| 244 | 245 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // The time that the last javascript message was dismissed. | 299 // The time that the last javascript message was dismissed. |
| 299 base::TimeTicks last_javascript_message_dismissal_; | 300 base::TimeTicks last_javascript_message_dismissal_; |
| 300 | 301 |
| 301 // Whether to suppress all javascript messages. | 302 // Whether to suppress all javascript messages. |
| 302 bool suppress_javascript_messages_; | 303 bool suppress_javascript_messages_; |
| 303 | 304 |
| 304 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 305 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
| 305 }; | 306 }; |
| 306 | 307 |
| 307 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 308 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| OLD | NEW |