~abreu-alexandre/oxide/add-ua-to-downloadrequested

« back to all changes in this revision

Viewing changes to patches/support-native-popup-menus.patch

  • Committer: Chris Coulson
  • Date: 2014-11-13 08:41:43 UTC
  • mfrom: (640.1.126 canary)
  • Revision ID: chris.coulson@canonical.com-20141113084143-z1s4xzkd12n4pa6g
Bump Chromium rev to 40.0.2214.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
6
6
--- a/content/browser/frame_host/render_frame_host_impl.cc
7
7
+++ b/content/browser/frame_host/render_frame_host_impl.cc
8
 
@@ -385,20 +385,18 @@ bool RenderFrameHostImpl::OnMessageRecei
9
 
                         OnShowDesktopNotification)
10
 
     IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
11
 
                         OnCancelDesktopNotification)
12
 
     IPC_MESSAGE_HANDLER(FrameHostMsg_TextSurroundingSelectionResponse,
 
8
@@ -390,20 +390,18 @@ bool RenderFrameHostImpl::OnMessageRecei
13
9
                         OnTextSurroundingSelectionResponse)
14
10
     IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Events, OnAccessibilityEvents)
15
11
     IPC_MESSAGE_HANDLER(AccessibilityHostMsg_LocationChanges,
16
12
                         OnAccessibilityLocationChanges)
 
13
     IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult,
 
14
                         OnAccessibilityFindInPageResult)
 
15
     IPC_MESSAGE_HANDLER(PushMessagingHostMsg_RequestPermission,
 
16
                         OnRequestPushPermission)
17
17
-#if defined(OS_MACOSX) || defined(OS_ANDROID)
18
18
     IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup)
19
19
     IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup)
26
26
 
27
27
 void RenderFrameHostImpl::AccessibilitySetFocus(int object_id) {
28
28
   Send(new AccessibilityMsg_SetFocus(routing_id_, object_id));
29
 
@@ -1185,17 +1183,16 @@ void RenderFrameHostImpl::OnAccessibilit
30
 
           GetOrCreateBrowserAccessibilityManager();
31
 
       if (manager)
32
 
         manager->OnLocationChanges(params);
33
 
     }
34
 
     // TODO(aboxhall): send location change events to web contents observers too
35
 
   }
 
29
@@ -1225,17 +1223,16 @@ void RenderFrameHostImpl::OnRequestPushP
 
30
       routing_id_,
 
31
       GetLastCommittedURL().GetOrigin(),
 
32
       user_gesture,
 
33
       base::Bind(&RenderFrameHostImpl::PushPermissionRequestDone,
 
34
                  weak_ptr_factory_.GetWeakPtr(),
 
35
                  request_id));
36
36
 }
37
37
 
38
38
-#if defined(OS_MACOSX) || defined(OS_ANDROID)
44
44
     view->ShowPopupMenu(this,
45
45
                         params.bounds,
46
46
                         params.item_height,
47
 
@@ -1208,17 +1205,16 @@ void RenderFrameHostImpl::OnShowPopup(
 
47
@@ -1248,17 +1245,16 @@ void RenderFrameHostImpl::OnShowPopup(
48
48
 }
49
49
 
50
50
 void RenderFrameHostImpl::OnHidePopup() {
62
62
     // TODO(creis): Bind process ID here so that GeolocationServiceImpl
63
63
     // can perform permissions checks once site isolation is complete.
64
64
     // crbug.com/426384
65
 
@@ -1577,29 +1573,28 @@ RenderFrameHostImpl::GetParentNativeView
 
65
@@ -1627,29 +1623,28 @@ RenderFrameHostImpl::GetParentNativeView
66
66
 void RenderFrameHostImpl::DidSelectPopupMenuItem(int selected_index) {
67
67
   Send(new FrameMsg_SelectPopupMenuItem(routing_id_, selected_index));
68
68
 }
96
96
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
97
97
--- a/content/browser/frame_host/render_frame_host_impl.h
98
98
+++ b/content/browser/frame_host/render_frame_host_impl.h
99
 
@@ -32,19 +32,17 @@
100
 
 
 
99
@@ -33,19 +33,17 @@
101
100
 class GURL;
102
101
 struct AccessibilityHostMsg_EventParams;
 
102
 struct AccessibilityHostMsg_FindInPageResultParams;
103
103
 struct AccessibilityHostMsg_LocationChangeParams;
104
104
 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
105
105
 struct FrameHostMsg_OpenURL_Params;
116
116
 
117
117
 namespace content {
118
118
 
119
 
@@ -345,20 +343,19 @@ class CONTENT_EXPORT RenderFrameHostImpl
 
119
@@ -349,20 +347,19 @@ class CONTENT_EXPORT RenderFrameHostImpl
120
120
 #if defined(OS_WIN)
121
121
   void SetParentNativeViewAccessible(
122
122
       gfx::NativeViewAccessible accessible_parent);
138
138
                         const CommonNavigationParams& common_params,
139
139
                         const CommitNavigationParams& commit_params);
140
140
 
141
 
@@ -441,20 +438,18 @@ class CONTENT_EXPORT RenderFrameHostImpl
142
 
   void OnBeginNavigation(const FrameHostMsg_BeginNavigation_Params& params,
143
 
                          const CommonNavigationParams& common_params);
144
 
   void OnAccessibilityEvents(
 
141
@@ -448,20 +445,18 @@ class CONTENT_EXPORT RenderFrameHostImpl
145
142
       const std::vector<AccessibilityHostMsg_EventParams>& params,
146
143
       int reset_token);
147
144
   void OnAccessibilityLocationChanges(
148
145
       const std::vector<AccessibilityHostMsg_LocationChangeParams>& params);
 
146
   void OnAccessibilityFindInPageResult(
 
147
       const AccessibilityHostMsg_FindInPageResultParams& params);
 
148
   void OnRequestPushPermission(int request_id, bool user_gesture);
149
149
 
150
150
-#if defined(OS_MACOSX) || defined(OS_ANDROID)
151
151
   void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params);
198
198
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
199
199
--- a/content/common/frame_messages.h
200
200
+++ b/content/common/frame_messages.h
201
 
@@ -296,17 +296,16 @@ IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavig
 
201
@@ -301,17 +301,16 @@ IPC_STRUCT_BEGIN(FrameHostMsg_BeginNavig
202
202
   // Optional resource request body (may be null).
203
203
   IPC_STRUCT_MEMBER(scoped_refptr<content::ResourceRequestBody>,
204
204
                     request_body)
216
216
 
217
217
   // The height of each item in the menu.
218
218
   IPC_STRUCT_MEMBER(int, item_height)
219
 
@@ -321,17 +320,16 @@ IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_
 
219
@@ -326,17 +325,16 @@ IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_
220
220
   IPC_STRUCT_MEMBER(std::vector<content::MenuItem>, popup_items)
221
221
 
222
222
   // Whether items should be right-aligned.
234
234
 // presented. When the frame finishes presenting, a matching
235
235
 // FrameHostMsg_CompositorFrameSwappedACK should be sent back to the
236
236
 // RenderViewHost that was produced the CompositorFrame.
237
 
@@ -457,24 +455,22 @@ IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroun
 
237
@@ -462,24 +460,22 @@ IPC_MESSAGE_ROUTED1(FrameMsg_TextSurroun
238
238
 // Tells the renderer to insert a link to the specified stylesheet. This is
239
239
 // needed to support navigation transitions.
240
240
 IPC_MESSAGE_ROUTED1(FrameMsg_AddStyleSheetByURL, std::string)
260
260
 #endif
261
261
 
262
262
 // PlzNavigate
263
 
@@ -759,16 +755,12 @@ IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNav
 
263
@@ -777,16 +773,12 @@ IPC_MESSAGE_CONTROL1(FrameHostMsg_AddNav
264
264
 IPC_MESSAGE_ROUTED2(FrameHostMsg_BeginNavigation,
265
265
                     FrameHostMsg_BeginNavigation_Params,
266
266
                     content::CommonNavigationParams)
375
375
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
376
376
--- a/content/renderer/render_frame_impl.cc
377
377
+++ b/content/renderer/render_frame_impl.cc
378
 
@@ -853,23 +853,21 @@ bool RenderFrameImpl::Send(IPC::Message*
 
378
@@ -873,23 +873,21 @@ bool RenderFrameImpl::Send(IPC::Message*
379
379
     // messages, so don't use the proxy.
380
380
     if (render_frame_proxy_ && message->routing_id() == routing_id_)
381
381
       return render_frame_proxy_->Send(message);
399
399
   // document-less RenderFrame is replaced by a RenderFrameProxy but kept
400
400
   // around and is still able to receive messages.
401
401
   if (!frame_->document().isNull())
402
 
@@ -921,19 +919,18 @@ bool RenderFrameImpl::OnMessageReceived(
 
402
@@ -943,19 +941,18 @@ bool RenderFrameImpl::OnMessageReceived(
403
403
                         OnTextSurroundingSelectionRequest)
404
404
     IPC_MESSAGE_HANDLER(FrameMsg_AddStyleSheetByURL,
405
405
                         OnAddStyleSheetByURL)
420
420
   return handled;
421
421
 }
422
422
 
423
 
@@ -1394,31 +1391,29 @@ void RenderFrameImpl::OnDisownOpener() {
 
423
@@ -1425,31 +1422,29 @@ void RenderFrameImpl::OnDisownOpener() {
424
424
   // disowning the opener on subframes, we will need to move WebContentsImpl's
425
425
   // opener_ to FrameTreeNode.
426
426
   CHECK(!frame_->parent());
452
452
   external_popup_menu_->DidSelectItem(selected_index);
453
453
   external_popup_menu_.reset();
454
454
 }
455
 
@@ -1760,17 +1755,17 @@ RenderFrameImpl::createWorkerPermissionC
 
455
@@ -1791,17 +1786,17 @@ RenderFrameImpl::createWorkerPermissionC
456
456
   DCHECK(!frame_ || frame_ == frame);
457
457
   return GetContentClient()->renderer()->CreateWorkerPermissionClientProxy(
458
458
       this, frame);
474
474
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
475
475
--- a/content/renderer/render_frame_impl.h
476
476
+++ b/content/renderer/render_frame_impl.h
477
 
@@ -243,19 +243,17 @@ class CONTENT_EXPORT RenderFrameImpl
478
 
                                const gfx::Range& replacement_range,
479
 
                                bool keep_selection);
 
477
@@ -247,19 +247,17 @@ class CONTENT_EXPORT RenderFrameImpl
 
478
 
 
479
   PluginPowerSaverHelper* plugin_power_saver_helper();
480
480
 #endif  // defined(ENABLE_PLUGINS)
481
481
 
482
482
   // May return NULL in some cases, especially if userMediaClient() returns
494
494
   bool OnMessageReceived(const IPC::Message& msg) override;
495
495
 
496
496
   // RenderFrame implementation:
497
 
@@ -556,20 +554,19 @@ class CONTENT_EXPORT RenderFrameImpl
 
497
@@ -569,20 +567,19 @@ class CONTENT_EXPORT RenderFrameImpl
498
498
   void OnExtendSelectionAndDelete(int before, int after);
499
499
   void OnReload(bool ignore_cache);
500
500
   void OnTextSurroundingSelectionRequest(size_t max_length);
516
516
   void OnRequestNavigation(const CommonNavigationParams& common_params,
517
517
                            const RequestNavigationParams& request_params);
518
518
   void OnCommitNavigation(const ResourceResponseHead& response,
519
 
@@ -782,20 +779,18 @@ class CONTENT_EXPORT RenderFrameImpl
 
519
@@ -801,20 +798,18 @@ class CONTENT_EXPORT RenderFrameImpl
520
520
 
521
521
   // The current accessibility mode.
522
522
   AccessibilityMode accessibility_mode_;
540
540
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
541
541
--- a/content/renderer/render_thread_impl.cc
542
542
+++ b/content/renderer/render_thread_impl.cc
543
 
@@ -409,20 +409,18 @@ RenderThreadImpl::RenderThreadImpl(const
 
543
@@ -410,20 +410,18 @@ RenderThreadImpl::RenderThreadImpl(const
544
544
 
545
545
 void RenderThreadImpl::Init() {
546
546
   TRACE_EVENT_BEGIN_ETW("RenderThreadImpl::Init", 0, "");