chromium/chrome/browser/task_manager/web_contents_tags.cc

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

#include "chrome/browser/task_manager/web_contents_tags.h"

#include <memory>

#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "chrome/browser/task_manager/providers/web_contents/background_contents_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/devtools_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/extension_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/guest_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/no_state_prefetch_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/printing_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/tab_contents_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/tool_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/web_app_tag.h"
#include "chrome/browser/task_manager/providers/web_contents/web_contents_tags_manager.h"
#include "components/guest_view/browser/guest_view_base.h"
#include "components/webapps/common/web_app_id.h"
#include "content/public/browser/web_contents.h"
#include "extensions/browser/process_manager.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/mojom/view_type.mojom.h"
#include "printing/buildflags/buildflags.h"

namespace task_manager {

namespace {

// Adds the |tag| to |contents|. It also adds the |tag| to the
// |WebContentsTagsManager|.
// Note: This will fail if |contents| is already tagged by |tag|.
void TagWebContents(content::WebContents* contents,
                    std::unique_ptr<WebContentsTag> tag,
                    void* tag_key) {}

bool IsExtensionWebContents(content::WebContents* contents) {}

}  // namespace

// static
void WebContentsTags::CreateForBackgroundContents(
    content::WebContents* web_contents,
    BackgroundContents* background_contents) {}

// static
void WebContentsTags::CreateForDevToolsContents(
    content::WebContents* web_contents) {}

// static
void WebContentsTags::CreateForNoStatePrefetchContents(
    content::WebContents* web_contents) {}

// static
void WebContentsTags::CreateForTabContents(content::WebContents* web_contents) {}

// static
void WebContentsTags::CreateForPrintingContents(
    content::WebContents* web_contents) {}

// static
void WebContentsTags::CreateForGuestContents(
    content::WebContents* web_contents) {}

// static
void WebContentsTags::CreateForExtension(
    content::WebContents* web_contents,
    extensions::mojom::ViewType view_type) {}

// static
void WebContentsTags::CreateForWebApp(content::WebContents* web_contents,
                                      const webapps::AppId& app_id,
                                      const bool is_isolated_web_app) {}

// static
void WebContentsTags::CreateForToolContents(content::WebContents* web_contents,
                                            int tool_name) {}

// static
void WebContentsTags::ClearTag(content::WebContents* web_contents) {}

}  // namespace task_manager