chromium/chrome/browser/ui/views/location_bar/location_bar_view.h

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

#ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_

#include <stddef.h>

#include <memory>
#include <string>
#include <vector>

#include "base/gtest_prod_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/scoped_observation.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_context_menu_model.h"
#include "chrome/browser/ui/location_bar/location_bar.h"
#include "chrome/browser/ui/page_action/page_action_icon_type.h"
#include "chrome/browser/ui/views/location_bar/content_setting_image_view.h"
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
#include "chrome/browser/ui/views/page_action/page_action_icon_view.h"
#include "chrome/browser/ui/views/permissions/chip/chip_controller.h"
#include "chrome/browser/ui/views/permissions/chip/permission_dashboard_controller.h"
#include "components/permissions/permission_prompt.h"
#include "components/security_state/core/security_state.h"
#include "services/device/public/cpp/geolocation/buildflags.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/base/pointer/touch_ui_controller.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/gfx/font.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/image/image.h"
#include "ui/views/animation/animation_delegate_views.h"
#include "ui/views/controls/focus_ring.h"
#include "ui/views/drag_controller.h"

#if BUILDFLAG(IS_MAC)
#include "components/webapps/common/web_app_id.h"
#endif

#if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED)
#include "services/device/public/cpp/geolocation/geolocation_system_permission_manager.h"
#endif  // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED)

class CommandUpdater;
class ContentSettingBubbleModelDelegate;
class IntentChipButton;
class LocationIconView;
enum class OmniboxPart;
class OmniboxPopupView;
class OmniboxViewViews;
class PageActionIconController;
class PageActionIconContainerView;
class PermissionDashboardView;
class Profile;
class SelectedKeywordView;

namespace views {
class ImageButton;
class Label;
}  // namespace views

/////////////////////////////////////////////////////////////////////////////
//
// LocationBarView class
//
//   The LocationBarView class is a View subclass that paints the background
//   of the URL bar strip and contains its content.
//
//   This class can be used outside the context of a normal browser window. See
//   PresentationReceiverWindowView and https://crbug.com/41351409 for details.
//
/////////////////////////////////////////////////////////////////////////////
class LocationBarView
    : public LocationBar,
      public LocationBarTesting,
      public views::View,
      public views::FocusChangeListener,
      public views::DragController,
      public views::AnimationDelegateViews,
      public IconLabelBubbleView::Delegate,
      public LocationIconView::Delegate,
      public ContentSettingImageView::Delegate,
#if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED)
      public device::GeolocationSystemPermissionManager::PermissionObserver,
#endif  // BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED)
      public PageActionIconView::Delegate {};

#endif  // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_