| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PRERENDER_PRERENDER_CONTENTS_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
| 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 // replacing with a NULL value. When a caller uses this, the caller will | 46 // replacing with a NULL value. When a caller uses this, the caller will |
| 47 // own (and is responsible for freeing) the old RVH. | 47 // own (and is responsible for freeing) the old RVH. |
| 48 void set_render_view_host(RenderViewHost* rvh) { render_view_host_ = rvh; } | 48 void set_render_view_host(RenderViewHost* rvh) { render_view_host_ = rvh; } |
| 49 ViewHostMsg_FrameNavigate_Params* navigate_params() { | 49 ViewHostMsg_FrameNavigate_Params* navigate_params() { |
| 50 return navigate_params_.get(); | 50 return navigate_params_.get(); |
| 51 } | 51 } |
| 52 string16 title() const { return title_; } | 52 string16 title() const { return title_; } |
| 53 int32 page_id() const { return page_id_; } | 53 int32 page_id() const { return page_id_; } |
| 54 | 54 |
| 55 // RenderViewHostDelegate implementation. | 55 // RenderViewHostDelegate implementation. |
| 56 virtual RenderViewHostDelegate::View* GetViewDelegate() { return this; } | 56 virtual RenderViewHostDelegate::View* GetViewDelegate(); |
| 57 virtual const GURL& GetURL() const { return url_; } | 57 virtual const GURL& GetURL() const; |
| 58 virtual ViewType::Type GetRenderViewType() const; | 58 virtual ViewType::Type GetRenderViewType() const; |
| 59 virtual int GetBrowserWindowID() const; | 59 virtual int GetBrowserWindowID() const; |
| 60 virtual void DidNavigate(RenderViewHost* render_view_host, | 60 virtual void DidNavigate(RenderViewHost* render_view_host, |
| 61 const ViewHostMsg_FrameNavigate_Params& params); | 61 const ViewHostMsg_FrameNavigate_Params& params); |
| 62 virtual void UpdateTitle(RenderViewHost* render_view_host, | 62 virtual void UpdateTitle(RenderViewHost* render_view_host, |
| 63 int32 page_id, | 63 int32 page_id, |
| 64 const std::wstring& title); | 64 const std::wstring& title); |
| 65 virtual WebPreferences GetWebkitPrefs(); | 65 virtual WebPreferences GetWebkitPrefs(); |
| 66 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params); | 66 virtual void ProcessDOMUIMessage(const ViewHostMsg_DomMessage_Params& params); |
| 67 virtual void RunJavaScriptMessage(const std::wstring& message, | 67 virtual void RunJavaScriptMessage(const std::wstring& message, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 virtual void Observe(NotificationType type, | 119 virtual void Observe(NotificationType type, |
| 120 const NotificationSource& source, | 120 const NotificationSource& source, |
| 121 const NotificationDetails& details); | 121 const NotificationDetails& details); |
| 122 | 122 |
| 123 // Overridden from JavaScriptAppModalDialogDelegate: | 123 // Overridden from JavaScriptAppModalDialogDelegate: |
| 124 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, | 124 virtual void OnMessageBoxClosed(IPC::Message* reply_msg, |
| 125 bool success, | 125 bool success, |
| 126 const std::wstring& prompt); | 126 const std::wstring& prompt); |
| 127 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {} | 127 virtual void SetSuppressMessageBoxes(bool suppress_message_boxes) {} |
| 128 virtual gfx::NativeWindow GetMessageBoxRootWindow(); | 128 virtual gfx::NativeWindow GetMessageBoxRootWindow(); |
| 129 virtual TabContents* AsTabContents() { return NULL; } | 129 virtual TabContents* AsTabContents(); |
| 130 virtual ExtensionHost* AsExtensionHost() { return NULL; } | 130 virtual ExtensionHost* AsExtensionHost(); |
| 131 | 131 |
| 132 virtual void UpdateInspectorSetting(const std::string& key, | 132 virtual void UpdateInspectorSetting(const std::string& key, |
| 133 const std::string& value); | 133 const std::string& value); |
| 134 virtual void ClearInspectorSettings(); | 134 virtual void ClearInspectorSettings(); |
| 135 | 135 |
| 136 private: | 136 private: |
| 137 // The prerender manager owning this object. | 137 // The prerender manager owning this object. |
| 138 PrerenderManager* prerender_manager_; | 138 PrerenderManager* prerender_manager_; |
| 139 | 139 |
| 140 // The host for our HTML content. | 140 // The host for our HTML content. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 159 // in a TabContents. | 159 // in a TabContents. |
| 160 string16 title_; | 160 string16 title_; |
| 161 int32 page_id_; | 161 int32 page_id_; |
| 162 GURL url_; | 162 GURL url_; |
| 163 NotificationRegistrar registrar_; | 163 NotificationRegistrar registrar_; |
| 164 | 164 |
| 165 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); | 165 DISALLOW_COPY_AND_ASSIGN(PrerenderContents); |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ | 168 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_CONTENTS_H_ |
| OLD | NEW |