#include "chrome/browser/ui/lens/lens_permission_bubble_controller.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/user_metrics.h"
#include "base/metrics/user_metrics_action.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_window/public/browser_window_interface.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/theme_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/lens/lens_features.h"
#include "components/lens/lens_overlay_permission_utils.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/common/referrer.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/dialog_model.h"
#include "ui/base/models/dialog_model_field.h"
#include "ui/base/models/image_model.h"
#include "ui/base/page_transition_types.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_types.h"
#include "ui/base/window_open_disposition.h"
#include "ui/base/window_open_disposition_utils.h"
#include "ui/compositor/layer.h"
#include "ui/views/controls/label.h"
#include "ui/views/widget/widget.h"
namespace lens {
namespace {
void LogShown(bool shown, std::string invocation_source) { … }
void LogUserAction(LensPermissionBubbleController::UserAction user_action,
std::string invocation_source) { … }
}
LensPermissionBubbleController::LensPermissionBubbleController(
BrowserWindowInterface* browser_window_interface,
PrefService* pref_service,
std::string invocation_source)
: … { … }
LensPermissionBubbleController::~LensPermissionBubbleController() { … }
void LensPermissionBubbleController::RequestPermission(
content::WebContents* web_contents,
RequestPermissionCallback callback) { … }
std::unique_ptr<ui::DialogModel>
LensPermissionBubbleController::CreateLensPermissionDialogModel() { … }
bool LensPermissionBubbleController::HasOpenDialogWidget() { … }
void LensPermissionBubbleController::OnHelpCenterLinkClicked(
const ui::Event& event) { … }
void LensPermissionBubbleController::OnPermissionDialogAccept() { … }
void LensPermissionBubbleController::OnPermissionDialogCancel() { … }
void LensPermissionBubbleController::OnPermissionDialogClose() { … }
void LensPermissionBubbleController::OnPermissionPreferenceUpdated(
RequestPermissionCallback callback) { … }
}