Commit 5a2fb0c3 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Guard ash::AppType use in BrowserNonClientBrowserFrameViewAsh

EXO tags the associated wayland/ShellSurface as being of
AppType::LACROS.

  void SetLacrosAppType(aura::Window* window) {
    window->SetProperty(aura::client::kAppType,
                        static_cast<int>(ash::AppType::LACROS));
  }

BUG=1113900
R=jamescook@chromium.org

Change-Id: Id83fb6d851009068b0e080515d27c1a5c9d3038e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533334
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#826535}
parent a3fdcbe6
......@@ -6,12 +6,12 @@
#include <algorithm>
#include "ash/public/cpp/app_types.h"
#include "ash/public/cpp/window_properties.h"
#include "ash/wm/window_util.h"
#include "base/metrics/user_metrics.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/themes/theme_properties.h"
......@@ -65,6 +65,10 @@
#include "chrome/browser/ui/views/frame/webui_tab_strip_container_view.h"
#endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP)
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/public/cpp/app_types.h"
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
namespace {
// Color for the window title text.
......@@ -123,10 +127,14 @@ void BrowserNonClientFrameViewAsh::Init() {
UpdateProfileIcons();
aura::Window* window = frame()->GetNativeWindow();
#if BUILDFLAG(IS_CHROMEOS_ASH)
// This is only needed for ash. For lacros, Exo tags the associated
// ShellSurface as being of AppType::LACROS.
window->SetProperty(
aura::client::kAppType,
static_cast<int>(browser->deprecated_is_app() ? ash::AppType::CHROME_APP
: ash::AppType::BROWSER));
#endif
window_observer_.Add(GetFrameWindow());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment