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

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

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 base::PickleIterator iter(*msg); 549 base::PickleIterator iter(*msg);
550 if (!iter.ReadInt(&msg_browser_plugin_instance_id) || 550 if (!iter.ReadInt(&msg_browser_plugin_instance_id) ||
551 msg_browser_plugin_instance_id != browser_plugin::kInstanceIDNone) { 551 msg_browser_plugin_instance_id != browser_plugin::kInstanceIDNone) {
552 return msg; 552 return msg;
553 } 553 }
554 554
555 // This method may be called with no browser_plugin_instance_id in tests. 555 // This method may be called with no browser_plugin_instance_id in tests.
556 if (!browser_plugin_instance_id()) 556 if (!browser_plugin_instance_id())
557 return msg; 557 return msg;
558 558
559 scoped_ptr<IPC::Message> new_msg( 559 std::unique_ptr<IPC::Message> new_msg(
560 new IPC::Message(msg->routing_id(), msg->type(), msg->priority())); 560 new IPC::Message(msg->routing_id(), msg->type(), msg->priority()));
561 new_msg->WriteInt(browser_plugin_instance_id()); 561 new_msg->WriteInt(browser_plugin_instance_id());
562 562
563 // Copy remaining payload from original message. 563 // Copy remaining payload from original message.
564 // TODO(wjmaclean): it would be nice if IPC::PickleIterator had a method 564 // TODO(wjmaclean): it would be nice if IPC::PickleIterator had a method
565 // like 'RemainingBytes()' so that we don't have to include implementation- 565 // like 'RemainingBytes()' so that we don't have to include implementation-
566 // specific details like sizeof() in the next line. 566 // specific details like sizeof() in the next line.
567 DCHECK(msg->payload_size() > sizeof(int)); 567 DCHECK(msg->payload_size() > sizeof(int));
568 size_t remaining_bytes = msg->payload_size() - sizeof(int); 568 size_t remaining_bytes = msg->payload_size() - sizeof(int);
569 const char* data = nullptr; 569 const char* data = nullptr;
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 range, character_bounds); 1002 range, character_bounds);
1003 } 1003 }
1004 #endif 1004 #endif
1005 1005
1006 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) { 1006 void BrowserPluginGuest::SetContextMenuPosition(const gfx::Point& position) {
1007 if (delegate_) 1007 if (delegate_)
1008 delegate_->SetContextMenuPosition(position); 1008 delegate_->SetContextMenuPosition(position);
1009 } 1009 }
1010 1010
1011 } // namespace content 1011 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.h ('k') | content/browser/browser_process_sub_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698