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

Side by Side Diff: components/guest_view/browser/guest_view_manager.cc

Issue 1459973005: Reland of Use std::tie() for operator< in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/guest_view/browser/guest_view_manager.h" 5 #include "components/guest_view/browser/guest_view_manager.h"
6 6
7 #include <tuple>
8
7 #include "base/macros.h" 9 #include "base/macros.h"
8 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
9 #include "components/guest_view/browser/guest_view_base.h" 11 #include "components/guest_view/browser/guest_view_base.h"
10 #include "components/guest_view/browser/guest_view_manager_delegate.h" 12 #include "components/guest_view/browser/guest_view_manager_delegate.h"
11 #include "components/guest_view/browser/guest_view_manager_factory.h" 13 #include "components/guest_view/browser/guest_view_manager_factory.h"
12 #include "components/guest_view/common/guest_view_constants.h" 14 #include "components/guest_view/common/guest_view_constants.h"
13 #include "content/public/browser/browser_context.h" 15 #include "content/public/browser/browser_context.h"
14 #include "content/public/browser/render_frame_host.h" 16 #include "content/public/browser/render_frame_host.h"
15 #include "content/public/browser/render_process_host.h" 17 #include "content/public/browser/render_process_host.h"
16 #include "content/public/browser/render_view_host.h" 18 #include "content/public/browser/render_view_host.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 471
470 GuestViewManager::ElementInstanceKey::ElementInstanceKey( 472 GuestViewManager::ElementInstanceKey::ElementInstanceKey(
471 int embedder_process_id, 473 int embedder_process_id,
472 int element_instance_id) 474 int element_instance_id)
473 : embedder_process_id(embedder_process_id), 475 : embedder_process_id(embedder_process_id),
474 element_instance_id(element_instance_id) { 476 element_instance_id(element_instance_id) {
475 } 477 }
476 478
477 bool GuestViewManager::ElementInstanceKey::operator<( 479 bool GuestViewManager::ElementInstanceKey::operator<(
478 const GuestViewManager::ElementInstanceKey& other) const { 480 const GuestViewManager::ElementInstanceKey& other) const {
479 if (embedder_process_id != other.embedder_process_id) 481 return std::tie(embedder_process_id, element_instance_id) <
480 return embedder_process_id < other.embedder_process_id; 482 std::tie(other.embedder_process_id, other.element_instance_id);
481
482 return element_instance_id < other.element_instance_id;
483 } 483 }
484 484
485 bool GuestViewManager::ElementInstanceKey::operator==( 485 bool GuestViewManager::ElementInstanceKey::operator==(
486 const GuestViewManager::ElementInstanceKey& other) const { 486 const GuestViewManager::ElementInstanceKey& other) const {
487 return (embedder_process_id == other.embedder_process_id) && 487 return (embedder_process_id == other.embedder_process_id) &&
488 (element_instance_id == other.element_instance_id); 488 (element_instance_id == other.element_instance_id);
489 } 489 }
490 490
491 GuestViewManager::GuestViewData::GuestViewData( 491 GuestViewManager::GuestViewData::GuestViewData(
492 const GuestViewCreateFunction& create_function, 492 const GuestViewCreateFunction& create_function,
493 const GuestViewCleanUpFunction& cleanup_function) 493 const GuestViewCleanUpFunction& cleanup_function)
494 : create_function(create_function), cleanup_function(cleanup_function) {} 494 : create_function(create_function), cleanup_function(cleanup_function) {}
495 495
496 GuestViewManager::GuestViewData::~GuestViewData() {} 496 GuestViewManager::GuestViewData::~GuestViewData() {}
497 497
498 } // namespace guest_view 498 } // namespace guest_view
OLDNEW
« no previous file with comments | « components/content_settings/core/browser/content_settings_origin_identifier_value_map.cc ('k') | components/mus/ws/ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698