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_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
22 #include "base/timer/timer.h" | 22 #include "base/timer/timer.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "cc/input/top_controls_state.h" | 24 #include "cc/input/top_controls_state.h" |
25 #include "content/common/content_export.h" | 25 #include "content/common/content_export.h" |
26 #include "content/common/drag_event_source_info.h" | 26 #include "content/common/drag_event_source_info.h" |
27 #include "content/common/edit_command.h" | 27 #include "content/common/edit_command.h" |
28 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 28 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
29 #include "content/common/navigation_gesture.h" | 29 #include "content/common/navigation_gesture.h" |
30 #include "content/common/view_message_enums.h" | 30 #include "content/common/view_message_enums.h" |
31 #include "content/public/common/javascript_message_type.h" | |
32 #include "content/public/common/page_zoom.h" | 31 #include "content/public/common/page_zoom.h" |
33 #include "content/public/common/referrer.h" | 32 #include "content/public/common/referrer.h" |
34 #include "content/public/common/renderer_preferences.h" | 33 #include "content/public/common/renderer_preferences.h" |
35 #include "content/public/common/stop_find_action.h" | 34 #include "content/public/common/stop_find_action.h" |
36 #include "content/public/common/top_controls_state.h" | 35 #include "content/public/common/top_controls_state.h" |
37 #include "content/public/renderer/render_view.h" | 36 #include "content/public/renderer/render_view.h" |
38 #include "content/renderer/media/webmediaplayer_delegate.h" | 37 #include "content/renderer/media/webmediaplayer_delegate.h" |
39 #include "content/renderer/mouse_lock_dispatcher.h" | 38 #include "content/renderer/mouse_lock_dispatcher.h" |
40 #include "content/renderer/render_frame_impl.h" | 39 #include "content/renderer/render_frame_impl.h" |
41 #include "content/renderer/render_widget.h" | 40 #include "content/renderer/render_widget.h" |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 blink::WebFileChooserCompletion* chooser_completion); | 441 blink::WebFileChooserCompletion* chooser_completion); |
443 virtual void runModalAlertDialog(blink::WebLocalFrame* frame, | 442 virtual void runModalAlertDialog(blink::WebLocalFrame* frame, |
444 const blink::WebString& message); | 443 const blink::WebString& message); |
445 virtual bool runModalConfirmDialog(blink::WebLocalFrame* frame, | 444 virtual bool runModalConfirmDialog(blink::WebLocalFrame* frame, |
446 const blink::WebString& message); | 445 const blink::WebString& message); |
447 virtual bool runModalPromptDialog(blink::WebLocalFrame* frame, | 446 virtual bool runModalPromptDialog(blink::WebLocalFrame* frame, |
448 const blink::WebString& message, | 447 const blink::WebString& message, |
449 const blink::WebString& default_value, | 448 const blink::WebString& default_value, |
450 blink::WebString* actual_value); | 449 blink::WebString* actual_value); |
451 virtual bool runModalBeforeUnloadDialog(blink::WebLocalFrame* frame, | 450 virtual bool runModalBeforeUnloadDialog(blink::WebLocalFrame* frame, |
452 bool is_reload, | |
453 const blink::WebString& message); | 451 const blink::WebString& message); |
| 452 // -- begin stub implementations -- |
| 453 virtual void runModalAlertDialog(const blink::WebString& message); |
| 454 virtual bool runModalConfirmDialog(const blink::WebString& message); |
| 455 virtual bool runModalPromptDialog(const blink::WebString& message, |
| 456 const blink::WebString& default_value, |
| 457 blink::WebString* actual_value); |
| 458 virtual bool runModalBeforeUnloadDialog(bool is_reload, |
| 459 const blink::WebString& message); |
| 460 // -- end stub implementations -- |
454 virtual void showValidationMessage(const blink::WebRect& anchor_in_root_view, | 461 virtual void showValidationMessage(const blink::WebRect& anchor_in_root_view, |
455 const blink::WebString& main_text, | 462 const blink::WebString& main_text, |
456 const blink::WebString& sub_text, | 463 const blink::WebString& sub_text, |
457 blink::WebTextDirection hint) OVERRIDE; | 464 blink::WebTextDirection hint) OVERRIDE; |
458 virtual void hideValidationMessage() OVERRIDE; | 465 virtual void hideValidationMessage() OVERRIDE; |
459 virtual void moveValidationMessage( | 466 virtual void moveValidationMessage( |
460 const blink::WebRect& anchor_in_root_view) OVERRIDE; | 467 const blink::WebRect& anchor_in_root_view) OVERRIDE; |
461 | |
462 // DEPRECATED | |
463 virtual bool runModalBeforeUnloadDialog(blink::WebLocalFrame* frame, | |
464 const blink::WebString& message); | |
465 virtual void setStatusText(const blink::WebString& text); | 468 virtual void setStatusText(const blink::WebString& text); |
466 virtual void setMouseOverURL(const blink::WebURL& url); | 469 virtual void setMouseOverURL(const blink::WebURL& url); |
467 virtual void setKeyboardFocusURL(const blink::WebURL& url); | 470 virtual void setKeyboardFocusURL(const blink::WebURL& url); |
468 virtual void startDragging(blink::WebLocalFrame* frame, | 471 virtual void startDragging(blink::WebLocalFrame* frame, |
469 const blink::WebDragData& data, | 472 const blink::WebDragData& data, |
470 blink::WebDragOperationsMask mask, | 473 blink::WebDragOperationsMask mask, |
471 const blink::WebImage& image, | 474 const blink::WebImage& image, |
472 const blink::WebPoint& imageOffset); | 475 const blink::WebPoint& imageOffset); |
473 virtual bool acceptsLoadDrops(); | 476 virtual bool acceptsLoadDrops(); |
474 virtual void focusNext(); | 477 virtual void focusNext(); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; | 630 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; |
628 virtual void SetWebkitPreferences(const WebPreferences& preferences) OVERRIDE; | 631 virtual void SetWebkitPreferences(const WebPreferences& preferences) OVERRIDE; |
629 virtual blink::WebView* GetWebView() OVERRIDE; | 632 virtual blink::WebView* GetWebView() OVERRIDE; |
630 virtual blink::WebElement GetFocusedElement() const OVERRIDE; | 633 virtual blink::WebElement GetFocusedElement() const OVERRIDE; |
631 virtual bool IsEditableNode(const blink::WebNode& node) const OVERRIDE; | 634 virtual bool IsEditableNode(const blink::WebNode& node) const OVERRIDE; |
632 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; | 635 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; |
633 virtual int GetEnabledBindings() const OVERRIDE; | 636 virtual int GetEnabledBindings() const OVERRIDE; |
634 virtual bool GetContentStateImmediately() const OVERRIDE; | 637 virtual bool GetContentStateImmediately() const OVERRIDE; |
635 virtual float GetFilteredTimePerFrame() const OVERRIDE; | 638 virtual float GetFilteredTimePerFrame() const OVERRIDE; |
636 virtual blink::WebPageVisibilityState GetVisibilityState() const OVERRIDE; | 639 virtual blink::WebPageVisibilityState GetVisibilityState() const OVERRIDE; |
637 virtual void RunModalAlertDialog(blink::WebLocalFrame* frame, | |
638 const blink::WebString& message) OVERRIDE; | |
639 virtual void DidStartLoading() OVERRIDE; | 640 virtual void DidStartLoading() OVERRIDE; |
640 virtual void DidStopLoading() OVERRIDE; | 641 virtual void DidStopLoading() OVERRIDE; |
641 virtual void Repaint(const gfx::Size& size) OVERRIDE; | 642 virtual void Repaint(const gfx::Size& size) OVERRIDE; |
642 virtual void SetEditCommandForNextKeyEvent(const std::string& name, | 643 virtual void SetEditCommandForNextKeyEvent(const std::string& name, |
643 const std::string& value) OVERRIDE; | 644 const std::string& value) OVERRIDE; |
644 virtual void ClearEditCommands() OVERRIDE; | 645 virtual void ClearEditCommands() OVERRIDE; |
645 virtual SSLStatus GetSSLStatusOfFrame(blink::WebFrame* frame) const OVERRIDE; | 646 virtual SSLStatus GetSSLStatusOfFrame(blink::WebFrame* frame) const OVERRIDE; |
646 virtual const std::string& GetAcceptLanguages() const OVERRIDE; | 647 virtual const std::string& GetAcceptLanguages() const OVERRIDE; |
647 #if defined(OS_ANDROID) | 648 #if defined(OS_ANDROID) |
648 virtual void UpdateTopControlsState(TopControlsState constraints, | 649 virtual void UpdateTopControlsState(TopControlsState constraints, |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 // b) function:DidReceiveTitle. When this function is called, | 817 // b) function:DidReceiveTitle. When this function is called, |
817 // that means we have got specified title. Because in most of webpages, | 818 // that means we have got specified title. Because in most of webpages, |
818 // title tags will follow meta tags. In here we try to get encoding of | 819 // title tags will follow meta tags. In here we try to get encoding of |
819 // page if it has been specified in meta tag. | 820 // page if it has been specified in meta tag. |
820 // c) function:DidFinishDocumentLoadForFrame. When this function is | 821 // c) function:DidFinishDocumentLoadForFrame. When this function is |
821 // called, that means we have got whole html page. In here we should | 822 // called, that means we have got whole html page. In here we should |
822 // finally get right encoding of page. | 823 // finally get right encoding of page. |
823 void UpdateEncoding(blink::WebFrame* frame, | 824 void UpdateEncoding(blink::WebFrame* frame, |
824 const std::string& encoding_name); | 825 const std::string& encoding_name); |
825 | 826 |
826 bool RunJavaScriptMessage(JavaScriptMessageType type, | |
827 const base::string16& message, | |
828 const base::string16& default_value, | |
829 const GURL& frame_url, | |
830 base::string16* result); | |
831 | |
832 // Sends a message and runs a nested message loop. | 827 // Sends a message and runs a nested message loop. |
833 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); | 828 bool SendAndRunNestedMessageLoop(IPC::SyncMessage* message); |
834 | 829 |
835 // Called when the "pinned to left/right edge" state needs to be updated. | 830 // Called when the "pinned to left/right edge" state needs to be updated. |
836 void UpdateScrollState(blink::WebFrame* frame); | 831 void UpdateScrollState(blink::WebFrame* frame); |
837 | 832 |
838 // IPC message handlers ------------------------------------------------------ | 833 // IPC message handlers ------------------------------------------------------ |
839 // | 834 // |
840 // The documentation for these functions should be in | 835 // The documentation for these functions should be in |
841 // content/common/*_messages.h for the message that the function is handling. | 836 // content/common/*_messages.h for the message that the function is handling. |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 // use the Observer interface to filter IPC messages and receive frame change | 1393 // use the Observer interface to filter IPC messages and receive frame change |
1399 // notifications. | 1394 // notifications. |
1400 // --------------------------------------------------------------------------- | 1395 // --------------------------------------------------------------------------- |
1401 | 1396 |
1402 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1397 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1403 }; | 1398 }; |
1404 | 1399 |
1405 } // namespace content | 1400 } // namespace content |
1406 | 1401 |
1407 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1402 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |