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

Side by Side Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2101943004: content: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase/update Created 4 years, 5 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 (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 #include "content/browser/browser_plugin/browser_plugin_guest.h" 5 #include "content/browser/browser_plugin/browser_plugin_guest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // navigations still continue to function inside the app. 325 // navigations still continue to function inside the app.
326 renderer_prefs->browser_handles_all_top_level_requests = false; 326 renderer_prefs->browser_handles_all_top_level_requests = false;
327 // Disable "client blocked" error page for browser plugin. 327 // Disable "client blocked" error page for browser plugin.
328 renderer_prefs->disable_client_blocked_error_page = true; 328 renderer_prefs->disable_client_blocked_error_page = true;
329 329
330 embedder_visibility_observer_.reset(new EmbedderVisibilityObserver(this)); 330 embedder_visibility_observer_.reset(new EmbedderVisibilityObserver(this));
331 331
332 DCHECK(GetWebContents()->GetRenderViewHost()); 332 DCHECK(GetWebContents()->GetRenderViewHost());
333 333
334 // Initialize the device scale factor by calling |NotifyScreenInfoChanged|. 334 // Initialize the device scale factor by calling |NotifyScreenInfoChanged|.
335 auto render_widget_host = RenderWidgetHostImpl::From( 335 auto* render_widget_host = RenderWidgetHostImpl::From(
336 GetWebContents()->GetRenderViewHost()->GetWidget()); 336 GetWebContents()->GetRenderViewHost()->GetWidget());
337 render_widget_host->NotifyScreenInfoChanged(); 337 render_widget_host->NotifyScreenInfoChanged();
338 338
339 // TODO(chrishtr): this code is wrong. The navigate_on_drag_drop field will 339 // TODO(chrishtr): this code is wrong. The navigate_on_drag_drop field will
340 // be reset again the next time preferences are updated. 340 // be reset again the next time preferences are updated.
341 WebPreferences prefs = 341 WebPreferences prefs =
342 GetWebContents()->GetRenderViewHost()->GetWebkitPreferences(); 342 GetWebContents()->GetRenderViewHost()->GetWebkitPreferences();
343 prefs.navigate_on_drag_drop = false; 343 prefs.navigate_on_drag_drop = false;
344 GetWebContents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs); 344 GetWebContents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs);
345 } 345 }
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 796
797 delegate_->DidDetach(); 797 delegate_->DidDetach();
798 } 798 }
799 799
800 void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id, 800 void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id,
801 blink::WebDragStatus drag_status, 801 blink::WebDragStatus drag_status,
802 const DropData& drop_data, 802 const DropData& drop_data,
803 blink::WebDragOperationsMask mask, 803 blink::WebDragOperationsMask mask,
804 const gfx::Point& location) { 804 const gfx::Point& location) {
805 RenderViewHost* host = GetWebContents()->GetRenderViewHost(); 805 RenderViewHost* host = GetWebContents()->GetRenderViewHost();
806 auto embedder = owner_web_contents_->GetBrowserPluginEmbedder(); 806 auto* embedder = owner_web_contents_->GetBrowserPluginEmbedder();
807 DropData filtered_data(drop_data); 807 DropData filtered_data(drop_data);
808 host->FilterDropData(&filtered_data); 808 host->FilterDropData(&filtered_data);
809 switch (drag_status) { 809 switch (drag_status) {
810 case blink::WebDragStatusEnter: 810 case blink::WebDragStatusEnter:
811 host->DragTargetDragEnter(filtered_data, location, location, mask, 811 host->DragTargetDragEnter(filtered_data, location, location, mask,
812 drop_data.key_modifiers); 812 drop_data.key_modifiers);
813 // Only track the URL being dragged over the guest if the link isn't 813 // Only track the URL being dragged over the guest if the link isn't
814 // coming from the guest. 814 // coming from the guest.
815 if (!embedder->DragEnteredGuest(this)) 815 if (!embedder->DragEnteredGuest(this))
816 ignore_dragged_url_ = false; 816 ignore_dragged_url_ = false;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 range, character_bounds); 1017 range, character_bounds);
1018 } 1018 }
1019 #endif 1019 #endif
1020 1020
1021 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1021 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1022 if (delegate_) 1022 if (delegate_)
1023 delegate_->SetContextMenuPosition(position); 1023 delegate_->SetContextMenuPosition(position);
1024 } 1024 }
1025 1025
1026 } // namespace content 1026 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698