| 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> |
| 9 #include <stdint.h> |
| 10 |
| 8 #include <deque> | 11 #include <deque> |
| 9 #include <map> | 12 #include <map> |
| 10 #include <set> | 13 #include <set> |
| 11 #include <string> | 14 #include <string> |
| 12 #include <vector> | 15 #include <vector> |
| 13 | 16 |
| 14 #include "base/basictypes.h" | |
| 15 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
| 16 #include "base/id_map.h" | 18 #include "base/id_map.h" |
| 19 #include "base/macros.h" |
| 17 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
| 18 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
| 19 #include "base/observer_list.h" | 22 #include "base/observer_list.h" |
| 20 #include "base/process/process.h" | 23 #include "base/process/process.h" |
| 21 #include "base/strings/string16.h" | 24 #include "base/strings/string16.h" |
| 22 #include "base/timer/timer.h" | 25 #include "base/timer/timer.h" |
| 23 #include "build/build_config.h" | 26 #include "build/build_config.h" |
| 24 #include "cc/input/top_controls_state.h" | 27 #include "cc/input/top_controls_state.h" |
| 25 #include "cc/resources/shared_bitmap.h" | 28 #include "cc/resources/shared_bitmap.h" |
| 26 #include "content/common/content_export.h" | 29 #include "content/common/content_export.h" |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 // IPC message handlers ------------------------------------------------------ | 611 // IPC message handlers ------------------------------------------------------ |
| 609 // | 612 // |
| 610 // The documentation for these functions should be in | 613 // The documentation for these functions should be in |
| 611 // content/common/*_messages.h for the message that the function is handling. | 614 // content/common/*_messages.h for the message that the function is handling. |
| 612 void OnExecuteEditCommand(const std::string& name, const std::string& value); | 615 void OnExecuteEditCommand(const std::string& name, const std::string& value); |
| 613 void OnMoveCaret(const gfx::Point& point); | 616 void OnMoveCaret(const gfx::Point& point); |
| 614 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); | 617 void OnScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); |
| 615 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); | 618 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); |
| 616 void OnAllowBindings(int enabled_bindings_flags); | 619 void OnAllowBindings(int enabled_bindings_flags); |
| 617 void OnAllowScriptToClose(bool script_can_close); | 620 void OnAllowScriptToClose(bool script_can_close); |
| 618 void OnCancelDownload(int32 download_id); | 621 void OnCancelDownload(int32_t download_id); |
| 619 void OnClearFocusedElement(); | 622 void OnClearFocusedElement(); |
| 620 void OnClosePage(); | 623 void OnClosePage(); |
| 621 void OnClose(); | 624 void OnClose(); |
| 622 | 625 |
| 623 void OnShowContextMenu(ui::MenuSourceType source_type, | 626 void OnShowContextMenu(ui::MenuSourceType source_type, |
| 624 const gfx::Point& location); | 627 const gfx::Point& location); |
| 625 void OnCopyImageAt(int x, int y); | 628 void OnCopyImageAt(int x, int y); |
| 626 void OnSaveImageAt(int x, int y); | 629 void OnSaveImageAt(int x, int y); |
| 627 void OnDeterminePageLanguage(); | 630 void OnDeterminePageLanguage(); |
| 628 void OnDisableScrollbarsForSmallWindows( | 631 void OnDisableScrollbarsForSmallWindows( |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 // Timer used to delay the updating of nav state (see | 842 // Timer used to delay the updating of nav state (see |
| 840 // StartNavStateSyncTimerIfNecessary). | 843 // StartNavStateSyncTimerIfNecessary). |
| 841 base::OneShotTimer nav_state_sync_timer_; | 844 base::OneShotTimer nav_state_sync_timer_; |
| 842 | 845 |
| 843 // Set of RenderFrame routing IDs for frames that having pending UpdateState | 846 // Set of RenderFrame routing IDs for frames that having pending UpdateState |
| 844 // messages to send when the next |nav_state_sync_timer_| fires. | 847 // messages to send when the next |nav_state_sync_timer_| fires. |
| 845 std::set<int> frames_with_pending_state_; | 848 std::set<int> frames_with_pending_state_; |
| 846 | 849 |
| 847 // Page IDs ------------------------------------------------------------------ | 850 // Page IDs ------------------------------------------------------------------ |
| 848 // See documentation in RenderView. | 851 // See documentation in RenderView. |
| 849 int32 page_id_; | 852 int32_t page_id_; |
| 850 | 853 |
| 851 // The next available page ID to use for this RenderView. These IDs are | 854 // The next available page ID to use for this RenderView. These IDs are |
| 852 // specific to a given RenderView and the frames within it. | 855 // specific to a given RenderView and the frames within it. |
| 853 int32 next_page_id_; | 856 int32_t next_page_id_; |
| 854 | 857 |
| 855 // The offset of the current item in the history list. | 858 // The offset of the current item in the history list. |
| 856 int history_list_offset_; | 859 int history_list_offset_; |
| 857 | 860 |
| 858 // The RenderView's current impression of the history length. This includes | 861 // The RenderView's current impression of the history length. This includes |
| 859 // any items that have committed in this process, but because of cross-process | 862 // any items that have committed in this process, but because of cross-process |
| 860 // navigations, the history may have some entries that were committed in other | 863 // navigations, the history may have some entries that were committed in other |
| 861 // processes. We won't know about them until the next navigation in this | 864 // processes. We won't know about them until the next navigation in this |
| 862 // process. | 865 // process. |
| 863 int history_list_length_; | 866 int history_list_length_; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 struct PendingFileChooser; | 1005 struct PendingFileChooser; |
| 1003 std::deque<scoped_ptr<PendingFileChooser>> file_chooser_completions_; | 1006 std::deque<scoped_ptr<PendingFileChooser>> file_chooser_completions_; |
| 1004 | 1007 |
| 1005 // The current directory enumeration callback | 1008 // The current directory enumeration callback |
| 1006 std::map<int, blink::WebFileChooserCompletion*> enumeration_completions_; | 1009 std::map<int, blink::WebFileChooserCompletion*> enumeration_completions_; |
| 1007 int enumeration_completion_id_; | 1010 int enumeration_completion_id_; |
| 1008 | 1011 |
| 1009 // The SessionStorage namespace that we're assigned to has an ID, and that ID | 1012 // The SessionStorage namespace that we're assigned to has an ID, and that ID |
| 1010 // is passed to us upon creation. WebKit asks for this ID upon first use and | 1013 // is passed to us upon creation. WebKit asks for this ID upon first use and |
| 1011 // uses it whenever asking the browser process to allocate new storage areas. | 1014 // uses it whenever asking the browser process to allocate new storage areas. |
| 1012 int64 session_storage_namespace_id_; | 1015 int64_t session_storage_namespace_id_; |
| 1013 | 1016 |
| 1014 // Stores edit commands associated to the next key event. | 1017 // Stores edit commands associated to the next key event. |
| 1015 // Shall be cleared as soon as the next key event is processed. | 1018 // Shall be cleared as soon as the next key event is processed. |
| 1016 EditCommands edit_commands_; | 1019 EditCommands edit_commands_; |
| 1017 | 1020 |
| 1018 // All the registered observers. We expect this list to be small, so vector | 1021 // All the registered observers. We expect this list to be small, so vector |
| 1019 // is fine. | 1022 // is fine. |
| 1020 base::ObserverList<RenderViewObserver> observers_; | 1023 base::ObserverList<RenderViewObserver> observers_; |
| 1021 | 1024 |
| 1022 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. | 1025 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1042 // use the Observer interface to filter IPC messages and receive frame change | 1045 // use the Observer interface to filter IPC messages and receive frame change |
| 1043 // notifications. | 1046 // notifications. |
| 1044 // --------------------------------------------------------------------------- | 1047 // --------------------------------------------------------------------------- |
| 1045 | 1048 |
| 1046 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1049 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1047 }; | 1050 }; |
| 1048 | 1051 |
| 1049 } // namespace content | 1052 } // namespace content |
| 1050 | 1053 |
| 1051 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1054 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |