| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 // JavaScriptMessageBoxClient | 180 // JavaScriptMessageBoxClient |
| 181 virtual std::wstring GetMessageBoxTitle(const GURL& frame_url, | 181 virtual std::wstring GetMessageBoxTitle(const GURL& frame_url, |
| 182 bool is_alert); | 182 bool is_alert); |
| 183 virtual gfx::NativeWindow GetMessageBoxRootWindow(); | 183 virtual gfx::NativeWindow GetMessageBoxRootWindow(); |
| 184 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, | 184 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, |
| 185 bool success, | 185 bool success, |
| 186 const std::wstring& prompt); | 186 const std::wstring& prompt); |
| 187 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {} | 187 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {} |
| 188 virtual TabContents* AsTabContents() { return NULL; } | 188 virtual TabContents* AsTabContents() { return NULL; } |
| 189 virtual ExtensionHost* AsExtensionHost() { return this; } |
| 189 | 190 |
| 190 private: | 191 private: |
| 191 friend class ProcessCreationQueue; | 192 friend class ProcessCreationQueue; |
| 192 | 193 |
| 193 // Whether to allow DOM automation for created RenderViewHosts. This is used | 194 // Whether to allow DOM automation for created RenderViewHosts. This is used |
| 194 // for testing. | 195 // for testing. |
| 195 static bool enable_dom_automation_; | 196 static bool enable_dom_automation_; |
| 196 | 197 |
| 197 // Actually create the RenderView for this host. See CreateRenderViewSoon. | 198 // Actually create the RenderView for this host. See CreateRenderViewSoon. |
| 198 void CreateRenderViewNow(); | 199 void CreateRenderViewNow(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 // are used here, others are not hosted by ExtensionHost. | 253 // are used here, others are not hosted by ExtensionHost. |
| 253 ViewType::Type extension_host_type_; | 254 ViewType::Type extension_host_type_; |
| 254 | 255 |
| 255 // Used to measure how long it's been since the host was created. | 256 // Used to measure how long it's been since the host was created. |
| 256 PerfTimer since_created_; | 257 PerfTimer since_created_; |
| 257 | 258 |
| 258 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 259 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
| 259 }; | 260 }; |
| 260 | 261 |
| 261 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 262 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| OLD | NEW |