| 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/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 bool IsRenderViewLive() const; | 69 bool IsRenderViewLive() const; |
| 70 | 70 |
| 71 // Initializes our RenderViewHost by creating its RenderView and navigating | 71 // Initializes our RenderViewHost by creating its RenderView and navigating |
| 72 // to this host's url. Uses host_view for the RenderViewHost's view (can be | 72 // to this host's url. Uses host_view for the RenderViewHost's view (can be |
| 73 // NULL). | 73 // NULL). |
| 74 void CreateRenderView(RenderWidgetHostView* host_view); | 74 void CreateRenderView(RenderWidgetHostView* host_view); |
| 75 | 75 |
| 76 // Sets |url_| and navigates |render_view_host_|. | 76 // Sets |url_| and navigates |render_view_host_|. |
| 77 void NavigateToURL(const GURL& url); | 77 void NavigateToURL(const GURL& url); |
| 78 | 78 |
| 79 // Restarts extension's renderer process. Can be called only if the renderer | |
| 80 // process crashed. | |
| 81 void RecoverCrashedExtension(); | |
| 82 | |
| 83 // RenderViewHostDelegate implementation. | 79 // RenderViewHostDelegate implementation. |
| 84 virtual RenderViewHostDelegate::View* GetViewDelegate(); | 80 virtual RenderViewHostDelegate::View* GetViewDelegate(); |
| 85 virtual const GURL& GetURL() const { return url_; } | 81 virtual const GURL& GetURL() const { return url_; } |
| 86 virtual void RenderViewCreated(RenderViewHost* render_view_host); | 82 virtual void RenderViewCreated(RenderViewHost* render_view_host); |
| 87 virtual ViewType::Type GetRenderViewType() const; | 83 virtual ViewType::Type GetRenderViewType() const; |
| 88 virtual int GetBrowserWindowID() const; | 84 virtual int GetBrowserWindowID() const; |
| 89 virtual void RenderViewGone(RenderViewHost* render_view_host); | 85 virtual void RenderViewGone(RenderViewHost* render_view_host); |
| 90 virtual void DidNavigate(RenderViewHost* render_view_host, | 86 virtual void DidNavigate(RenderViewHost* render_view_host, |
| 91 const ViewHostMsg_FrameNavigate_Params& params); | 87 const ViewHostMsg_FrameNavigate_Params& params); |
| 92 virtual void DidStopLoading(RenderViewHost* render_view_host); | 88 virtual void DidStopLoading(RenderViewHost* render_view_host); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; | 176 scoped_ptr<ExtensionFunctionDispatcher> extension_function_dispatcher_; |
| 181 | 177 |
| 182 // Only EXTENSION_TOOLSTRIP and EXTENSION_BACKGROUND_PAGE are used here, | 178 // Only EXTENSION_TOOLSTRIP and EXTENSION_BACKGROUND_PAGE are used here, |
| 183 // others are not hostd by ExtensionHost. | 179 // others are not hostd by ExtensionHost. |
| 184 ViewType::Type extension_host_type_; | 180 ViewType::Type extension_host_type_; |
| 185 | 181 |
| 186 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); | 182 DISALLOW_COPY_AND_ASSIGN(ExtensionHost); |
| 187 }; | 183 }; |
| 188 | 184 |
| 189 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ | 185 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_HOST_H_ |
| OLD | NEW |