#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/ui/views/task_manager_view.h"
#include <stddef.h>
#include "base/containers/adapters.h"
#include "base/functional/callback_helpers.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/task_manager/task_manager_interface.h"
#include "chrome/browser/task_manager/task_manager_observer.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/task_manager/task_manager_columns.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/branded_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/image_model.h"
#include "ui/base/models/table_model_observer.h"
#include "ui/base/mojom/dialog_button.mojom.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/table/table_view.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/public/cpp/shelf_item.h"
#include "ash/public/cpp/window_properties.h"
#include "chrome/browser/apps/icon_standardizer.h"
#include "chrome/grit/theme_resources.h"
#include "ui/aura/window.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
#endif
#if BUILDFLAG(IS_WIN)
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/shell_integration_win.h"
#include "ui/base/win/shell.h"
#include "ui/views/win/hwnd_util.h"
#endif
namespace task_manager {
namespace {
TaskManagerView* g_task_manager_view = …;
}
TaskManagerView::~TaskManagerView() { … }
task_manager::TaskManagerTableModel* TaskManagerView::Show(Browser* browser) { … }
void TaskManagerView::Hide() { … }
bool TaskManagerView::IsColumnVisible(int column_id) const { … }
bool TaskManagerView::SetColumnVisibility(int column_id, bool new_visibility) { … }
bool TaskManagerView::IsTableSorted() const { … }
TableSortDescriptor TaskManagerView::GetSortDescriptor() const { … }
void TaskManagerView::SetSortDescriptor(const TableSortDescriptor& descriptor) { … }
void TaskManagerView::MaybeHighlightActiveTask() { … }
gfx::Size TaskManagerView::CalculatePreferredSize(
const views::SizeBounds& available_size) const { … }
bool TaskManagerView::AcceleratorPressed(const ui::Accelerator& accelerator) { … }
views::View* TaskManagerView::GetInitiallyFocusedView() { … }
bool TaskManagerView::ExecuteWindowsCommand(int command_id) { … }
ui::ImageModel TaskManagerView::GetWindowIcon() { … }
std::string TaskManagerView::GetWindowName() const { … }
bool TaskManagerView::Accept() { … }
bool TaskManagerView::IsDialogButtonEnabled(
ui::mojom::DialogButton button) const { … }
void TaskManagerView::WindowClosing() { … }
void TaskManagerView::GetGroupRange(size_t model_index,
views::GroupRange* range) { … }
void TaskManagerView::OnSelectionChanged() { … }
void TaskManagerView::OnDoubleClick() { … }
void TaskManagerView::OnKeyDown(ui::KeyboardCode keycode) { … }
void TaskManagerView::ShowContextMenuForViewImpl(
views::View* source,
const gfx::Point& point,
ui::MenuSourceType source_type) { … }
bool TaskManagerView::IsCommandIdChecked(int id) const { … }
bool TaskManagerView::IsCommandIdEnabled(int id) const { … }
void TaskManagerView::ExecuteCommand(int id, int event_flags) { … }
void TaskManagerView::MenuClosed(ui::SimpleMenuModel* source) { … }
TaskManagerView::TaskManagerView()
: … { … }
TaskManagerView* TaskManagerView::GetInstanceForTests() { … }
void TaskManagerView::Init() { … }
void TaskManagerView::InitAlwaysOnTopState() { … }
void TaskManagerView::ActivateSelectedTab() { … }
void TaskManagerView::SelectTaskOfActiveTab(Browser* browser) { … }
void TaskManagerView::RetrieveSavedAlwaysOnTopState() { … }
BEGIN_METADATA(…)
}
namespace chrome {
#if BUILDFLAG(IS_MAC)
task_manager::TaskManagerTableModel* ShowTaskManagerViews(Browser* browser) {
return task_manager::TaskManagerView::Show(browser);
}
void HideTaskManagerViews() {
task_manager::TaskManagerView::Hide();
}
#endif
}