| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/perftimer.h" | 10 #include "base/perftimer.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 // JavaScriptMessageBoxClient | 150 // JavaScriptMessageBoxClient |
| 151 virtual std::wstring GetMessageBoxTitle(const GURL& frame_url, | 151 virtual std::wstring GetMessageBoxTitle(const GURL& frame_url, |
| 152 bool is_alert); | 152 bool is_alert); |
| 153 virtual gfx::NativeWindow GetMessageBoxRootWindow(); | 153 virtual gfx::NativeWindow GetMessageBoxRootWindow(); |
| 154 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, | 154 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, |
| 155 bool success, | 155 bool success, |
| 156 const std::wstring& prompt); | 156 const std::wstring& prompt); |
| 157 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {} | 157 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {} |
| 158 virtual TabContents* AsTabContents() { return NULL; } | 158 virtual TabContents* AsTabContents() { return NULL; } |
| 159 virtual ExtensionHost* AsExtensionHost() { return this; } |
| 159 | 160 |
| 160 private: | 161 private: |
| 161 friend class ProcessCreationQueue; | 162 friend class ProcessCreationQueue; |
| 162 | 163 |
| 163 // Whether to allow DOM automation for created RenderViewHosts. This is used | 164 // Whether to allow DOM automation for created RenderViewHosts. This is used |
| 164 // for testing. | 165 // for testing. |
| 165 static bool enable_dom_automation_; | 166 static bool enable_dom_automation_; |
| 166 | 167 |
| 167 // Actually create the RenderView for this host. See CreateRenderViewSoon. | 168 // Actually create the RenderView for this host. See CreateRenderViewSoon. |
| 168 void CreateRenderViewNow(); | 169 void CreateRenderViewNow(); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 // are used here, others are not hosted by ExtensionHost. | 220 // are used here, others are not hosted by ExtensionHost. |
| 220 ViewType::Type extension_host_type_; | 221 ViewType::Type extension_host_type_; |
| 221 | 222 |
| 222 // Used to measure how long it's been since the host was created. | 223 // Used to measure how long it's been since the host was created. |
| 223 PerfTimer since_created_; | 224 PerfTimer since_created_; |
| 224 | 225 |
| 225 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 226 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 229 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| OLD | NEW |