#include "chrome/browser/ui/views/chrome_views_delegate.h"
#include <memory>
#include "base/check_op.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
#include "chrome/browser/profiles/keep_alive/scoped_profile_keep_alive.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_window_state.h"
#include "components/keep_alive_registry/keep_alive_registry.h"
#include "components/keep_alive_registry/keep_alive_types.h"
#include "components/keep_alive_registry/scoped_keep_alive.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/version_info/version_info.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/views/widget/widget.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/ui/ash/touch_selection_menu/touch_selection_menu_runner_chromeos.h"
#include "chromeos/ui/base/app_types.h"
#include "chromeos/ui/base/window_properties.h"
#include "chromeos/ui/frame/frame_utils.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/views/widget/widget_delegate.h"
#endif
namespace {
Profile* GetProfileForWindow(const views::Widget* window) { … }
PrefService* GetPrefsForWindow(const views::Widget* window) { … }
}
ChromeViewsDelegate::ChromeViewsDelegate() { … }
ChromeViewsDelegate::~ChromeViewsDelegate() { … }
void ChromeViewsDelegate::SaveWindowPlacement(const views::Widget* window,
const std::string& window_name,
const gfx::Rect& bounds,
ui::WindowShowState show_state) { … }
bool ChromeViewsDelegate::GetSavedWindowPlacement(
const views::Widget* widget,
const std::string& window_name,
gfx::Rect* bounds,
ui::WindowShowState* show_state) const { … }
bool ChromeViewsDelegate::IsShuttingDown() const { … }
void ChromeViewsDelegate::AddRef() { … }
void ChromeViewsDelegate::ReleaseRef() { … }
void ChromeViewsDelegate::OnBeforeWidgetInit(
views::Widget::InitParams* params,
views::internal::NativeWidgetDelegate* delegate) { … }
std::string ChromeViewsDelegate::GetApplicationName() { … }