OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 virtual const GURL& GetMainFrameLastCommittedURL() const OVERRIDE; | 306 virtual const GURL& GetMainFrameLastCommittedURL() const OVERRIDE; |
307 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) OVERRIDE; | 307 virtual void RenderFrameCreated(RenderFrameHost* render_frame_host) OVERRIDE; |
308 virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) OVERRIDE; | 308 virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) OVERRIDE; |
309 virtual void DidStartLoading(RenderFrameHost* render_frame_host, | 309 virtual void DidStartLoading(RenderFrameHost* render_frame_host, |
310 bool to_different_document) OVERRIDE; | 310 bool to_different_document) OVERRIDE; |
311 virtual void DidStopLoading(RenderFrameHost* render_frame_host) OVERRIDE; | 311 virtual void DidStopLoading(RenderFrameHost* render_frame_host) OVERRIDE; |
312 virtual void SwappedOut(RenderFrameHost* render_frame_host) OVERRIDE; | 312 virtual void SwappedOut(RenderFrameHost* render_frame_host) OVERRIDE; |
313 virtual void WorkerCrashed(RenderFrameHost* render_frame_host) OVERRIDE; | 313 virtual void WorkerCrashed(RenderFrameHost* render_frame_host) OVERRIDE; |
314 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, | 314 virtual void ShowContextMenu(RenderFrameHost* render_frame_host, |
315 const ContextMenuParams& params) OVERRIDE; | 315 const ContextMenuParams& params) OVERRIDE; |
| 316 virtual void RunJavaScriptMessage(RenderFrameHost* rfh, |
| 317 const base::string16& message, |
| 318 const base::string16& default_prompt, |
| 319 const GURL& frame_url, |
| 320 JavaScriptMessageType type, |
| 321 IPC::Message* reply_msg, |
| 322 bool* did_suppress_message) OVERRIDE; |
| 323 virtual void RunBeforeUnloadConfirm(RenderFrameHost* rfh, |
| 324 const base::string16& message, |
| 325 bool is_reload, |
| 326 IPC::Message* reply_msg) OVERRIDE; |
316 virtual WebContents* GetAsWebContents() OVERRIDE; | 327 virtual WebContents* GetAsWebContents() OVERRIDE; |
317 | 328 |
318 // RenderViewHostDelegate ---------------------------------------------------- | 329 // RenderViewHostDelegate ---------------------------------------------------- |
319 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; | 330 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; |
320 virtual bool OnMessageReceived(RenderViewHost* render_view_host, | 331 virtual bool OnMessageReceived(RenderViewHost* render_view_host, |
321 const IPC::Message& message) OVERRIDE; | 332 const IPC::Message& message) OVERRIDE; |
322 // RenderFrameHostDelegate has the same method, so list it there because this | 333 // RenderFrameHostDelegate has the same method, so list it there because this |
323 // interface is going away. | 334 // interface is going away. |
324 // virtual WebContents* GetAsWebContents() OVERRIDE; | 335 // virtual WebContents* GetAsWebContents() OVERRIDE; |
325 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; | 336 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; |
(...skipping 21 matching lines...) Expand all Loading... |
347 virtual void DidAccessInitialDocument() OVERRIDE; | 358 virtual void DidAccessInitialDocument() OVERRIDE; |
348 virtual void DocumentAvailableInMainFrame( | 359 virtual void DocumentAvailableInMainFrame( |
349 RenderViewHost* render_view_host) OVERRIDE; | 360 RenderViewHost* render_view_host) OVERRIDE; |
350 virtual void DocumentOnLoadCompletedInMainFrame( | 361 virtual void DocumentOnLoadCompletedInMainFrame( |
351 RenderViewHost* render_view_host, | 362 RenderViewHost* render_view_host, |
352 int32 page_id) OVERRIDE; | 363 int32 page_id) OVERRIDE; |
353 virtual void RouteCloseEvent(RenderViewHost* rvh) OVERRIDE; | 364 virtual void RouteCloseEvent(RenderViewHost* rvh) OVERRIDE; |
354 virtual void RouteMessageEvent( | 365 virtual void RouteMessageEvent( |
355 RenderViewHost* rvh, | 366 RenderViewHost* rvh, |
356 const ViewMsg_PostMessage_Params& params) OVERRIDE; | 367 const ViewMsg_PostMessage_Params& params) OVERRIDE; |
357 virtual void RunJavaScriptMessage(RenderViewHost* rvh, | 368 virtual void RunJavaScriptMessageOBSOLETE( |
358 const base::string16& message, | 369 RenderViewHost* rvh, |
359 const base::string16& default_prompt, | 370 const base::string16& message, |
360 const GURL& frame_url, | 371 const base::string16& default_prompt, |
361 JavaScriptMessageType type, | 372 const GURL& frame_url, |
362 IPC::Message* reply_msg, | 373 JavaScriptMessageType type, |
363 bool* did_suppress_message) OVERRIDE; | 374 IPC::Message* reply_msg, |
364 virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, | 375 bool* did_suppress_message) OVERRIDE; |
365 const base::string16& message, | 376 virtual void RunBeforeUnloadConfirmOBSOLETE(RenderViewHost* rvh, |
366 bool is_reload, | 377 const base::string16& message, |
367 IPC::Message* reply_msg) OVERRIDE; | 378 bool is_reload, |
| 379 IPC::Message* reply_msg) OVERRIDE; |
368 virtual bool AddMessageToConsole(int32 level, | 380 virtual bool AddMessageToConsole(int32 level, |
369 const base::string16& message, | 381 const base::string16& message, |
370 int32 line_no, | 382 int32 line_no, |
371 const base::string16& source_id) OVERRIDE; | 383 const base::string16& source_id) OVERRIDE; |
372 virtual RendererPreferences GetRendererPrefs( | 384 virtual RendererPreferences GetRendererPrefs( |
373 BrowserContext* browser_context) const OVERRIDE; | 385 BrowserContext* browser_context) const OVERRIDE; |
374 virtual WebPreferences GetWebkitPrefs() OVERRIDE; | 386 virtual WebPreferences GetWebkitPrefs() OVERRIDE; |
375 virtual void OnUserGesture() OVERRIDE; | 387 virtual void OnUserGesture() OVERRIDE; |
376 virtual void OnIgnoredUIEvent() OVERRIDE; | 388 virtual void OnIgnoredUIEvent() OVERRIDE; |
377 virtual void RendererUnresponsive(RenderViewHost* render_view_host, | 389 virtual void RendererUnresponsive(RenderViewHost* render_view_host, |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 | 651 |
640 // Creates and adds to the map a destruction observer watching |web_contents|. | 652 // Creates and adds to the map a destruction observer watching |web_contents|. |
641 // No-op if such an observer already exists. | 653 // No-op if such an observer already exists. |
642 void AddDestructionObserver(WebContentsImpl* web_contents); | 654 void AddDestructionObserver(WebContentsImpl* web_contents); |
643 | 655 |
644 // Deletes and removes from the map a destruction observer | 656 // Deletes and removes from the map a destruction observer |
645 // watching |web_contents|. No-op if there is no such observer. | 657 // watching |web_contents|. No-op if there is no such observer. |
646 void RemoveDestructionObserver(WebContentsImpl* web_contents); | 658 void RemoveDestructionObserver(WebContentsImpl* web_contents); |
647 | 659 |
648 // Callback function when showing JS dialogs. | 660 // Callback function when showing JS dialogs. |
649 void OnDialogClosed(RenderViewHost* rvh, | 661 void OnDialogClosedOBSOLETE(RenderViewHost* rvh, |
| 662 IPC::Message* reply_msg, |
| 663 bool success, |
| 664 const base::string16& user_input); |
| 665 |
| 666 // Callback function when showing JS dialogs. |
| 667 void OnDialogClosed(RenderFrameHost* rfh, |
650 IPC::Message* reply_msg, | 668 IPC::Message* reply_msg, |
651 bool success, | 669 bool success, |
652 const base::string16& user_input); | 670 const base::string16& user_input); |
653 | 671 |
654 // Callback function when requesting permission to access the PPAPI broker. | 672 // Callback function when requesting permission to access the PPAPI broker. |
655 // |result| is true if permission was granted. | 673 // |result| is true if permission was granted. |
656 void OnPpapiBrokerPermissionResult(int routing_id, bool result); | 674 void OnPpapiBrokerPermissionResult(int routing_id, bool result); |
657 | 675 |
658 bool OnMessageReceived(RenderViewHost* render_view_host, | 676 bool OnMessageReceived(RenderViewHost* render_view_host, |
659 RenderFrameHost* render_frame_host, | 677 RenderFrameHost* render_frame_host, |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 // Whether this WebContents is responsible for displaying a subframe in a | 1068 // Whether this WebContents is responsible for displaying a subframe in a |
1051 // different process from its parent page. | 1069 // different process from its parent page. |
1052 bool is_subframe_; | 1070 bool is_subframe_; |
1053 | 1071 |
1054 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1072 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1055 }; | 1073 }; |
1056 | 1074 |
1057 } // namespace content | 1075 } // namespace content |
1058 | 1076 |
1059 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1077 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |