| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
| 22 #include "base/observer_list.h" | 22 #include "base/observer_list.h" |
| 23 #include "base/process/process.h" | 23 #include "base/process/process.h" |
| 24 #include "base/strings/string16.h" | 24 #include "base/strings/string16.h" |
| 25 #include "base/timer/timer.h" | 25 #include "base/timer/timer.h" |
| 26 #include "build/build_config.h" | 26 #include "build/build_config.h" |
| 27 #include "cc/input/top_controls_state.h" | 27 #include "cc/input/top_controls_state.h" |
| 28 #include "cc/resources/shared_bitmap.h" | 28 #include "cc/resources/shared_bitmap.h" |
| 29 #include "content/common/content_export.h" | 29 #include "content/common/content_export.h" |
| 30 #include "content/common/drag_event_source_info.h" | 30 #include "content/common/drag_event_source_info.h" |
| 31 #include "content/common/edit_command.h" | |
| 32 #include "content/common/frame_message_enums.h" | 31 #include "content/common/frame_message_enums.h" |
| 33 #include "content/common/navigation_gesture.h" | 32 #include "content/common/navigation_gesture.h" |
| 34 #include "content/common/page_message_enums.h" | 33 #include "content/common/page_message_enums.h" |
| 35 #include "content/common/view_message_enums.h" | 34 #include "content/common/view_message_enums.h" |
| 36 #include "content/public/common/drop_data.h" | 35 #include "content/public/common/drop_data.h" |
| 37 #include "content/public/common/page_zoom.h" | 36 #include "content/public/common/page_zoom.h" |
| 38 #include "content/public/common/referrer.h" | 37 #include "content/public/common/referrer.h" |
| 39 #include "content/public/common/renderer_preferences.h" | 38 #include "content/public/common/renderer_preferences.h" |
| 40 #include "content/public/common/top_controls_state.h" | 39 #include "content/public/common/top_controls_state.h" |
| 41 #include "content/public/common/web_preferences.h" | 40 #include "content/public/common/web_preferences.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 const blink::WebString& frame_name, | 326 const blink::WebString& frame_name, |
| 328 blink::WebNavigationPolicy policy, | 327 blink::WebNavigationPolicy policy, |
| 329 bool suppress_opener) override; | 328 bool suppress_opener) override; |
| 330 blink::WebWidget* createPopupMenu(blink::WebPopupType popup_type) override; | 329 blink::WebWidget* createPopupMenu(blink::WebPopupType popup_type) override; |
| 331 blink::WebStorageNamespace* createSessionStorageNamespace() override; | 330 blink::WebStorageNamespace* createSessionStorageNamespace() override; |
| 332 void printPage(blink::WebLocalFrame* frame) override; | 331 void printPage(blink::WebLocalFrame* frame) override; |
| 333 bool enumerateChosenDirectory( | 332 bool enumerateChosenDirectory( |
| 334 const blink::WebString& path, | 333 const blink::WebString& path, |
| 335 blink::WebFileChooserCompletion* chooser_completion) override; | 334 blink::WebFileChooserCompletion* chooser_completion) override; |
| 336 void didCancelCompositionOnSelectionChange() override; | 335 void didCancelCompositionOnSelectionChange() override; |
| 337 bool handleCurrentKeyboardEvent() override; | |
| 338 void SetValidationMessageDirection(base::string16* main_text, | 336 void SetValidationMessageDirection(base::string16* main_text, |
| 339 blink::WebTextDirection main_text_hint, | 337 blink::WebTextDirection main_text_hint, |
| 340 base::string16* sub_text, | 338 base::string16* sub_text, |
| 341 blink::WebTextDirection sub_text_hint); | 339 blink::WebTextDirection sub_text_hint); |
| 342 void showValidationMessage(const blink::WebRect& anchor_in_viewport, | 340 void showValidationMessage(const blink::WebRect& anchor_in_viewport, |
| 343 const blink::WebString& main_text, | 341 const blink::WebString& main_text, |
| 344 blink::WebTextDirection main_text_hint, | 342 blink::WebTextDirection main_text_hint, |
| 345 const blink::WebString& sub_text, | 343 const blink::WebString& sub_text, |
| 346 blink::WebTextDirection hint) override; | 344 blink::WebTextDirection hint) override; |
| 347 void hideValidationMessage() override; | 345 void hideValidationMessage() override; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 CONNECTION_ERROR, | 527 CONNECTION_ERROR, |
| 530 }; | 528 }; |
| 531 | 529 |
| 532 // RenderWidgetOwnerDelegate implementation ---------------------------------- | 530 // RenderWidgetOwnerDelegate implementation ---------------------------------- |
| 533 | 531 |
| 534 void RenderWidgetDidSetColorProfile( | 532 void RenderWidgetDidSetColorProfile( |
| 535 const std::vector<char>& color_profile) override; | 533 const std::vector<char>& color_profile) override; |
| 536 void RenderWidgetFocusChangeComplete() override; | 534 void RenderWidgetFocusChangeComplete() override; |
| 537 bool DoesRenderWidgetHaveTouchEventHandlersAt( | 535 bool DoesRenderWidgetHaveTouchEventHandlersAt( |
| 538 const gfx::Point& point) const override; | 536 const gfx::Point& point) const override; |
| 539 void RenderWidgetDidHandleKeyEvent() override; | |
| 540 bool RenderWidgetWillHandleGestureEvent( | 537 bool RenderWidgetWillHandleGestureEvent( |
| 541 const blink::WebGestureEvent& event) override; | 538 const blink::WebGestureEvent& event) override; |
| 542 bool RenderWidgetWillHandleMouseEvent( | 539 bool RenderWidgetWillHandleMouseEvent( |
| 543 const blink::WebMouseEvent& event) override; | 540 const blink::WebMouseEvent& event) override; |
| 544 void RenderWidgetDidFlushPaint() override; | 541 void RenderWidgetDidFlushPaint() override; |
| 545 | 542 |
| 546 // Old WebFrameClient implementations ---------------------------------------- | 543 // Old WebFrameClient implementations ---------------------------------------- |
| 547 | 544 |
| 548 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the | 545 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the |
| 549 // WebFrameClient. However, many implementations of WebFrameClient methods | 546 // WebFrameClient. However, many implementations of WebFrameClient methods |
| (...skipping 13 matching lines...) Expand all Loading... |
| 563 blink::WebView* web_view, | 560 blink::WebView* web_view, |
| 564 CompositorDependencies* compositor_deps); | 561 CompositorDependencies* compositor_deps); |
| 565 | 562 |
| 566 // IPC message handlers ------------------------------------------------------ | 563 // IPC message handlers ------------------------------------------------------ |
| 567 // | 564 // |
| 568 // The documentation for these functions should be in | 565 // The documentation for these functions should be in |
| 569 // content/common/*_messages.h for the message that the function is handling. | 566 // content/common/*_messages.h for the message that the function is handling. |
| 570 void OnExecuteEditCommand(const std::string& name, const std::string& value); | 567 void OnExecuteEditCommand(const std::string& name, const std::string& value); |
| 571 void OnMoveCaret(const gfx::Point& point); | 568 void OnMoveCaret(const gfx::Point& point); |
| 572 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); | 569 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); |
| 573 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); | |
| 574 void OnAllowBindings(int enabled_bindings_flags); | 570 void OnAllowBindings(int enabled_bindings_flags); |
| 575 void OnAllowScriptToClose(bool script_can_close); | 571 void OnAllowScriptToClose(bool script_can_close); |
| 576 void OnCancelDownload(int32_t download_id); | 572 void OnCancelDownload(int32_t download_id); |
| 577 void OnClearFocusedElement(); | 573 void OnClearFocusedElement(); |
| 578 void OnClosePage(); | 574 void OnClosePage(); |
| 579 void OnClose(); | 575 void OnClose(); |
| 580 | 576 |
| 581 void OnShowContextMenu(ui::MenuSourceType source_type, | 577 void OnShowContextMenu(ui::MenuSourceType source_type, |
| 582 const gfx::Point& location); | 578 const gfx::Point& location); |
| 583 void OnDeterminePageLanguage(); | 579 void OnDeterminePageLanguage(); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 879 |
| 884 // The current directory enumeration callback | 880 // The current directory enumeration callback |
| 885 std::map<int, blink::WebFileChooserCompletion*> enumeration_completions_; | 881 std::map<int, blink::WebFileChooserCompletion*> enumeration_completions_; |
| 886 int enumeration_completion_id_; | 882 int enumeration_completion_id_; |
| 887 | 883 |
| 888 // The SessionStorage namespace that we're assigned to has an ID, and that ID | 884 // The SessionStorage namespace that we're assigned to has an ID, and that ID |
| 889 // is passed to us upon creation. WebKit asks for this ID upon first use and | 885 // is passed to us upon creation. WebKit asks for this ID upon first use and |
| 890 // uses it whenever asking the browser process to allocate new storage areas. | 886 // uses it whenever asking the browser process to allocate new storage areas. |
| 891 int64_t session_storage_namespace_id_; | 887 int64_t session_storage_namespace_id_; |
| 892 | 888 |
| 893 // Stores edit commands associated to the next key event. | |
| 894 // Shall be cleared as soon as the next key event is processed. | |
| 895 EditCommands edit_commands_; | |
| 896 | |
| 897 // All the registered observers. We expect this list to be small, so vector | 889 // All the registered observers. We expect this list to be small, so vector |
| 898 // is fine. | 890 // is fine. |
| 899 base::ObserverList<RenderViewObserver> observers_; | 891 base::ObserverList<RenderViewObserver> observers_; |
| 900 | 892 |
| 901 // This field stores drag/drop related info for the event that is currently | 893 // This field stores drag/drop related info for the event that is currently |
| 902 // being handled. If the current event results in starting a drag/drop | 894 // being handled. If the current event results in starting a drag/drop |
| 903 // session, this info is sent to the browser along with other drag/drop info. | 895 // session, this info is sent to the browser along with other drag/drop info. |
| 904 DragEventSourceInfo possible_drag_event_info_; | 896 DragEventSourceInfo possible_drag_event_info_; |
| 905 | 897 |
| 906 // NOTE: stats_collection_observer_ should be the last members because their | 898 // NOTE: stats_collection_observer_ should be the last members because their |
| (...skipping 13 matching lines...) Expand all Loading... |
| 920 // use the Observer interface to filter IPC messages and receive frame change | 912 // use the Observer interface to filter IPC messages and receive frame change |
| 921 // notifications. | 913 // notifications. |
| 922 // --------------------------------------------------------------------------- | 914 // --------------------------------------------------------------------------- |
| 923 | 915 |
| 924 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 916 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 925 }; | 917 }; |
| 926 | 918 |
| 927 } // namespace content | 919 } // namespace content |
| 928 | 920 |
| 929 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 921 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |