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

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

Issue 501583003: Move external popup menus from WebViewClient to WebFrameClient, part 3/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 3 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 | Annotate | Revision Log
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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 19 matching lines...) Expand all
30 #include "ui/gfx/range/range.h" 30 #include "ui/gfx/range/range.h"
31 31
32 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
33 #include "content/renderer/media/android/renderer_media_player_manager.h" 33 #include "content/renderer/media/android/renderer_media_player_manager.h"
34 #endif 34 #endif
35 35
36 class TransportDIB; 36 class TransportDIB;
37 struct FrameMsg_Navigate_Params; 37 struct FrameMsg_Navigate_Params;
38 38
39 namespace blink { 39 namespace blink {
40 class WebExternalPopupMenu;
41 class WebExternalPopupMenuClient;
42 class WebGeolocationClient; 40 class WebGeolocationClient;
43 class WebInputEvent; 41 class WebInputEvent;
44 class WebMouseEvent; 42 class WebMouseEvent;
45 class WebContentDecryptionModule; 43 class WebContentDecryptionModule;
46 class WebMediaPlayer; 44 class WebMediaPlayer;
47 class WebNotificationPresenter; 45 class WebNotificationPresenter;
48 class WebPushClient; 46 class WebPushClient;
49 class WebSecurityOrigin; 47 class WebSecurityOrigin;
50 struct WebCompositionUnderline; 48 struct WebCompositionUnderline;
51 struct WebContextMenuData; 49 struct WebContextMenuData;
52 struct WebCursorInfo; 50 struct WebCursorInfo;
53 struct WebPopupMenuInfo;
54 } 51 }
55 52
56 namespace gfx { 53 namespace gfx {
57 class Point; 54 class Point;
58 class Range; 55 class Range;
59 class Rect; 56 class Rect;
60 } 57 }
61 58
62 namespace content { 59 namespace content {
63 60
64 class ChildFrameCompositingHelper; 61 class ChildFrameCompositingHelper;
62 class ExternalPopupMenu;
65 class GeolocationDispatcher; 63 class GeolocationDispatcher;
66 class MediaStreamDispatcher; 64 class MediaStreamDispatcher;
67 class MediaStreamImpl; 65 class MediaStreamImpl;
68 class MediaStreamRendererFactory; 66 class MediaStreamRendererFactory;
69 class MidiDispatcher; 67 class MidiDispatcher;
70 class NotificationPermissionDispatcher; 68 class NotificationPermissionDispatcher;
71 class NotificationProvider; 69 class NotificationProvider;
72 class PepperPluginInstanceImpl; 70 class PepperPluginInstanceImpl;
73 class PushMessagingDispatcher; 71 class PushMessagingDispatcher;
74 class RendererAccessibility; 72 class RendererAccessibility;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 void OnImeConfirmComposition( 229 void OnImeConfirmComposition(
232 const base::string16& text, 230 const base::string16& text,
233 const gfx::Range& replacement_range, 231 const gfx::Range& replacement_range,
234 bool keep_selection); 232 bool keep_selection);
235 #endif // ENABLE_PLUGINS 233 #endif // ENABLE_PLUGINS
236 234
237 // May return NULL in some cases, especially if userMediaClient() returns 235 // May return NULL in some cases, especially if userMediaClient() returns
238 // NULL. 236 // NULL.
239 MediaStreamDispatcher* GetMediaStreamDispatcher(); 237 MediaStreamDispatcher* GetMediaStreamDispatcher();
240 238
239 #if defined(OS_MACOSX) || defined(OS_ANDROID)
240 void DidHideExternalPopupMenu();
241 #endif
242
241 // IPC::Sender 243 // IPC::Sender
242 virtual bool Send(IPC::Message* msg) OVERRIDE; 244 virtual bool Send(IPC::Message* msg) OVERRIDE;
243 245
244 // IPC::Listener 246 // IPC::Listener
245 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 247 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
246 248
247 // RenderFrame implementation: 249 // RenderFrame implementation:
248 virtual RenderView* GetRenderView() OVERRIDE; 250 virtual RenderView* GetRenderView() OVERRIDE;
249 virtual int GetRoutingID() OVERRIDE; 251 virtual int GetRoutingID() OVERRIDE;
250 virtual blink::WebFrame* GetWebFrame() OVERRIDE; 252 virtual blink::WebFrame* GetWebFrame() OVERRIDE;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // service registry. 451 // service registry.
450 void BindServiceRegistry( 452 void BindServiceRegistry(
451 mojo::ScopedMessagePipeHandle service_provider_handle); 453 mojo::ScopedMessagePipeHandle service_provider_handle);
452 454
453 protected: 455 protected:
454 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); 456 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id);
455 457
456 private: 458 private:
457 friend class RenderFrameObserver; 459 friend class RenderFrameObserver;
458 friend class RendererAccessibilityTest; 460 friend class RendererAccessibilityTest;
461 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuDisplayNoneTest, SelectItem);
462 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
463 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
464 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
459 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, 465 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
460 AccessibilityMessagesQueueWhileSwappedOut); 466 AccessibilityMessagesQueueWhileSwappedOut);
461 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, 467 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest,
462 ShouldUpdateSelectionTextFromContextMenuParams); 468 ShouldUpdateSelectionTextFromContextMenuParams);
463 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 469 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
464 OnExtendSelectionAndDelete); 470 OnExtendSelectionAndDelete);
465 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut); 471 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut);
466 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK); 472 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK);
467 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 473 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
468 SetEditableSelectionAndComposition); 474 SetEditableSelectionAndComposition);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 int start, int end, 520 int start, int end,
515 const std::vector<blink::WebCompositionUnderline>& underlines); 521 const std::vector<blink::WebCompositionUnderline>& underlines);
516 void OnExtendSelectionAndDelete(int before, int after); 522 void OnExtendSelectionAndDelete(int before, int after);
517 void OnReload(bool ignore_cache); 523 void OnReload(bool ignore_cache);
518 void OnTextSurroundingSelectionRequest(size_t max_length); 524 void OnTextSurroundingSelectionRequest(size_t max_length);
519 void OnAddStyleSheetByURL(const std::string& url); 525 void OnAddStyleSheetByURL(const std::string& url);
520 void OnSetupTransitionView(const std::string& markup); 526 void OnSetupTransitionView(const std::string& markup);
521 void OnBeginExitTransition(const std::string& css_selector); 527 void OnBeginExitTransition(const std::string& css_selector);
522 void OnSetAccessibilityMode(AccessibilityMode new_mode); 528 void OnSetAccessibilityMode(AccessibilityMode new_mode);
523 void OnDisownOpener(); 529 void OnDisownOpener();
524 #if defined(OS_MACOSX) 530 #if defined(OS_ANDROID)
531 void OnSelectPopupMenuItems(bool canceled,
532 const std::vector<int>& selected_indices);
533 #elif defined(OS_MACOSX)
534 void OnSelectPopupMenuItem(int selected_index);
525 void OnCopyToFindPboard(); 535 void OnCopyToFindPboard();
526 #endif 536 #endif
527 537
528 // Virtual since overridden by WebTestProxy for layout tests. 538 // Virtual since overridden by WebTestProxy for layout tests.
529 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( 539 virtual blink::WebNavigationPolicy DecidePolicyForNavigation(
530 RenderFrame* render_frame, 540 RenderFrame* render_frame,
531 const NavigationPolicyInfo& info); 541 const NavigationPolicyInfo& info);
532 void OpenURL(blink::WebFrame* frame, 542 void OpenURL(blink::WebFrame* frame,
533 const GURL& url, 543 const GURL& url,
534 const Referrer& referrer, 544 const Referrer& referrer,
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 // initialized. 718 // initialized.
709 ScreenOrientationDispatcher* screen_orientation_dispatcher_; 719 ScreenOrientationDispatcher* screen_orientation_dispatcher_;
710 720
711 // The current accessibility mode. 721 // The current accessibility mode.
712 AccessibilityMode accessibility_mode_; 722 AccessibilityMode accessibility_mode_;
713 723
714 // Only valid if |accessibility_mode_| is anything other than 724 // Only valid if |accessibility_mode_| is anything other than
715 // AccessibilityModeOff. 725 // AccessibilityModeOff.
716 RendererAccessibility* renderer_accessibility_; 726 RendererAccessibility* renderer_accessibility_;
717 727
728 #if defined(OS_MACOSX) || defined(OS_ANDROID)
729 // The external popup for the currently showing select popup.
730 scoped_ptr<ExternalPopupMenu> external_popup_menu_;
731 #endif
732
718 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 733 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
719 734
720 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 735 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
721 }; 736 };
722 737
723 } // namespace content 738 } // namespace content
724 739
725 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 740 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/external_popup_menu_browsertest.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698