Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: content/renderer/render_frame_impl.h

Issue 2884243003: Add a mojo channel for frame messages. (Closed)
Patch Set: Fix presubmit warning I ignored Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 void MaybeEnableMojoBindings(); 727 void MaybeEnableMojoBindings();
728 // Adds the given file chooser request to the file_chooser_completion_ queue 728 // Adds the given file chooser request to the file_chooser_completion_ queue
729 // (see that var for more) and requests the chooser be displayed if there are 729 // (see that var for more) and requests the chooser be displayed if there are
730 // no other waiting items in the queue. 730 // no other waiting items in the queue.
731 // 731 //
732 // Returns true if the chooser was successfully scheduled. False means we 732 // Returns true if the chooser was successfully scheduled. False means we
733 // didn't schedule anything. 733 // didn't schedule anything.
734 bool ScheduleFileChooser(const FileChooserParams& params, 734 bool ScheduleFileChooser(const FileChooserParams& params,
735 blink::WebFileChooserCompletion* completion); 735 blink::WebFileChooserCompletion* completion);
736 736
737 bool handling_select_range() const { return handling_select_range_; }
738
739 void set_is_pasting(bool value) { is_pasting_ = value; }
740
741 void set_handling_select_range(bool value) { handling_select_range_ = value; }
742
737 // Plugin-related functions -------------------------------------------------- 743 // Plugin-related functions --------------------------------------------------
738 744
739 #if BUILDFLAG(ENABLE_PLUGINS) 745 #if BUILDFLAG(ENABLE_PLUGINS)
740 PepperPluginInstanceImpl* focused_pepper_plugin() { 746 PepperPluginInstanceImpl* focused_pepper_plugin() {
741 return focused_pepper_plugin_; 747 return focused_pepper_plugin_;
742 } 748 }
743 PepperPluginInstanceImpl* pepper_last_mouse_event_target() { 749 PepperPluginInstanceImpl* pepper_last_mouse_event_target() {
744 return pepper_last_mouse_event_target_; 750 return pepper_last_mouse_event_target_;
745 } 751 }
746 void set_pepper_last_mouse_event_target(PepperPluginInstanceImpl* plugin) { 752 void set_pepper_last_mouse_event_target(PepperPluginInstanceImpl* plugin) {
747 pepper_last_mouse_event_target_ = plugin; 753 pepper_last_mouse_event_target_ = plugin;
748 } 754 }
749 755
750 // Indicates that the given instance has been created. 756 // Indicates that the given instance has been created.
751 void PepperInstanceCreated(PepperPluginInstanceImpl* instance); 757 void PepperInstanceCreated(PepperPluginInstanceImpl* instance);
752 758
753 // Indicates that the given instance is being destroyed. This is called from 759 // Indicates that the given instance is being destroyed. This is called from
754 // the destructor, so it's important that the instance is not dereferenced 760 // the destructor, so it's important that the instance is not dereferenced
755 // from this call. 761 // from this call.
756 void PepperInstanceDeleted(PepperPluginInstanceImpl* instance); 762 void PepperInstanceDeleted(PepperPluginInstanceImpl* instance);
757 763
758 // Notification that the given plugin is focused or unfocused. 764 // Notification that the given plugin is focused or unfocused.
759 void PepperFocusChanged(PepperPluginInstanceImpl* instance, bool focused); 765 void PepperFocusChanged(PepperPluginInstanceImpl* instance, bool focused);
760 766
761 void PepperStartsPlayback(PepperPluginInstanceImpl* instance); 767 void PepperStartsPlayback(PepperPluginInstanceImpl* instance);
762 void PepperStopsPlayback(PepperPluginInstanceImpl* instance); 768 void PepperStopsPlayback(PepperPluginInstanceImpl* instance);
763 void OnSetPepperVolume(int32_t pp_instance, double volume); 769 void OnSetPepperVolume(int32_t pp_instance, double volume);
764 #endif // ENABLE_PLUGINS 770 #endif // ENABLE_PLUGINS
765 771
772 #if defined(OS_MACOSX)
773 void OnCopyToFindPboard();
774 #endif
775
776 // Dispatches the current state of selection on the webpage to the browser if
777 // it has changed.
778 // TODO(varunjain): delete this method once we figure out how to keep
779 // selection handles in sync with the webpage.
780 void SyncSelectionIfRequired();
781
766 protected: 782 protected:
767 explicit RenderFrameImpl(const CreateParams& params); 783 explicit RenderFrameImpl(const CreateParams& params);
768 784
769 private: 785 private:
770 friend class RenderFrameImplTest; 786 friend class RenderFrameImplTest;
771 friend class RenderFrameObserver; 787 friend class RenderFrameObserver;
772 friend class RenderAccessibilityImplTest; 788 friend class RenderAccessibilityImplTest;
773 friend class TestRenderFrame; 789 friend class TestRenderFrame;
774 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem); 790 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
775 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); 791 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 968
953 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) 969 #if BUILDFLAG(USE_EXTERNAL_POPUP_MENU)
954 #if defined(OS_MACOSX) 970 #if defined(OS_MACOSX)
955 void OnSelectPopupMenuItem(int selected_index); 971 void OnSelectPopupMenuItem(int selected_index);
956 #else 972 #else
957 void OnSelectPopupMenuItems(bool canceled, 973 void OnSelectPopupMenuItems(bool canceled,
958 const std::vector<int>& selected_indices); 974 const std::vector<int>& selected_indices);
959 #endif 975 #endif
960 #endif 976 #endif
961 977
962 #if defined(OS_MACOSX)
963 void OnCopyToFindPboard();
964 #endif
965
966 // Callback scheduled from OnSerializeAsMHTML for when writing serialized 978 // Callback scheduled from OnSerializeAsMHTML for when writing serialized
967 // MHTML to file has been completed in the file thread. 979 // MHTML to file has been completed in the file thread.
968 void OnWriteMHTMLToDiskComplete( 980 void OnWriteMHTMLToDiskComplete(
969 int job_id, 981 int job_id,
970 std::set<std::string> serialized_resources_uri_digests, 982 std::set<std::string> serialized_resources_uri_digests,
971 base::TimeDelta main_thread_use_time, 983 base::TimeDelta main_thread_use_time,
972 MhtmlSaveStatus save_status); 984 MhtmlSaveStatus save_status);
973 985
974 // Requests that the browser process navigates to |url|. If 986 // Requests that the browser process navigates to |url|. If
975 // |is_history_navigation_in_new_child| is true, the browser process should 987 // |is_history_navigation_in_new_child| is true, the browser process should
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 // b) function:DidReceiveTitle. When this function is called, 1020 // b) function:DidReceiveTitle. When this function is called,
1009 // that means we have got specified title. Because in most of webpages, 1021 // that means we have got specified title. Because in most of webpages,
1010 // title tags will follow meta tags. In here we try to get encoding of 1022 // title tags will follow meta tags. In here we try to get encoding of
1011 // page if it has been specified in meta tag. 1023 // page if it has been specified in meta tag.
1012 // c) function:DidFinishDocumentLoadForFrame. When this function is 1024 // c) function:DidFinishDocumentLoadForFrame. When this function is
1013 // called, that means we have got whole html page. In here we should 1025 // called, that means we have got whole html page. In here we should
1014 // finally get right encoding of page. 1026 // finally get right encoding of page.
1015 void UpdateEncoding(blink::WebFrame* frame, 1027 void UpdateEncoding(blink::WebFrame* frame,
1016 const std::string& encoding_name); 1028 const std::string& encoding_name);
1017 1029
1018 // Dispatches the current state of selection on the webpage to the browser if
1019 // it has changed.
1020 // TODO(varunjain): delete this method once we figure out how to keep
1021 // selection handles in sync with the webpage.
1022 void SyncSelectionIfRequired();
1023
1024 bool RunJavaScriptDialog(JavaScriptDialogType type, 1030 bool RunJavaScriptDialog(JavaScriptDialogType type,
1025 const base::string16& message, 1031 const base::string16& message,
1026 const base::string16& default_value, 1032 const base::string16& default_value,
1027 const GURL& frame_url, 1033 const GURL& frame_url,
1028 base::string16* result); 1034 base::string16* result);
1029 1035
1030 // Loads the appropriate error page for the specified failure into the frame. 1036 // Loads the appropriate error page for the specified failure into the frame.
1031 // |entry| is only used by PlzNavigate when navigating to a history item. 1037 // |entry| is only used by PlzNavigate when navigating to a history item.
1032 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request, 1038 void LoadNavigationErrorPage(const blink::WebURLRequest& failed_request,
1033 const blink::WebURLError& error, 1039 const blink::WebURLError& error,
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_; 1503 std::vector<media::RoutingTokenCallback> pending_routing_token_callbacks_;
1498 1504
1499 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 1505 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
1500 1506
1501 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 1507 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
1502 }; 1508 };
1503 1509
1504 } // namespace content 1510 } // namespace content
1505 1511
1506 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 1512 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/input/frame_input_handler_impl.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698