1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50

ash / quick_insert / model / quick_insert_search_results_section.cc [blame]

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ash/quick_insert/model/quick_insert_search_results_section.h"

#include <utility>
#include <vector>

#include "ash/quick_insert/quick_insert_search_result.h"
#include "base/containers/span.h"

namespace ash {

QuickInsertSearchResultsSection::QuickInsertSearchResultsSection(
    QuickInsertSectionType type,
    std::vector<QuickInsertSearchResult> results,
    bool has_more_results)
    : type_(type),
      results_(std::move(results)),
      has_more_results_(has_more_results) {}

QuickInsertSearchResultsSection::QuickInsertSearchResultsSection(
    const QuickInsertSearchResultsSection& other) = default;

QuickInsertSearchResultsSection& QuickInsertSearchResultsSection::operator=(
    const QuickInsertSearchResultsSection& other) = default;

QuickInsertSearchResultsSection::QuickInsertSearchResultsSection(
    QuickInsertSearchResultsSection&& other) = default;

QuickInsertSearchResultsSection& QuickInsertSearchResultsSection::operator=(
    QuickInsertSearchResultsSection&& other) = default;

QuickInsertSearchResultsSection::~QuickInsertSearchResultsSection() = default;

QuickInsertSectionType QuickInsertSearchResultsSection::type() const {
  return type_;
}

base::span<const QuickInsertSearchResult>
QuickInsertSearchResultsSection::results() const {
  return results_;
}

bool QuickInsertSearchResultsSection::has_more_results() const {
  return has_more_results_;
}

}  // namespace ash