[M130 Migration] Disable platform ui for close button on chrome 09/324909/3
authorutkarshlal <utkarsh.lal@samsung.com>
Wed, 28 May 2025 11:57:38 +0000 (17:27 +0530)
committerBot Blink <blinkbot@samsung.com>
Fri, 30 May 2025 12:36:24 +0000 (12:36 +0000)
Below change disables platform ui which was enabled by
default on launch and make chrome ui visible instead and also
remove minimize and maximize buttons from chrome's Taskbar.

Reference: https://review.tizen.org/gerrit/c/316309

Change-Id: If13c31b3bd30d2c01fb34df9ec1d0ed6bc83e6b0
Signed-off-by: utkarshlal <utkarsh.lal@samsung.com>
tizen_src/chromium_impl/ui/ozone/platform/efl/ozone_platform_efl.cc
ui/views/window/window_button_order_provider.cc

index ea0959a915514f5b2fe422c48aa839b9b6a2eada..36eef694f48e2aee25ec48e59fa44ce01c17d6e2 100644 (file)
@@ -1,6 +1,6 @@
-// Copyright 2021 nclude "ui/display/types/native_display_delegate.h"    Samsung
-// Electronics. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
+// Copyright 2021 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
 
 #include "ui/ozone/platform/efl/ozone_platform_efl.h"
 
@@ -9,6 +9,8 @@
 #include <utility>
 #include <vector>
 
+#include "base/base_switches.h"
+#include "base/command_line.h"
 #include "base/memory/ptr_util.h"
 #include "base/message_loop/message_pump_type.h"
 #include "base/no_destructor.h"
@@ -181,14 +183,18 @@ class OzonePlatformEfl : public OzonePlatform {
     return *properties;
   }
 
-#if defined(TIZEN_TV_UPSTREAM_MULTIMEDIA)
   const PlatformRuntimeProperties& GetPlatformRuntimeProperties() override {
     static OzonePlatform::PlatformRuntimeProperties properties;
+#if defined(TIZEN_TV_UPSTREAM_MULTIMEDIA)
     properties.supports_native_pixmaps = true;
     properties.supports_overlays = true;
+#endif
+    if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+            switches::kEnableChrome)) {
+      properties.supports_server_side_window_decorations = false;
+    }
     return properties;
   }
-#endif  // defined(TIZEN_TV_UPSTREAM_MULTIMEDIA)
 
   bool IsWindowCompositingSupported() const override {
     // TODO: Check if this method is required to return true for EFL.
index 7ad53d94a87104a020ed7841edfe20249d396bfe..dc167c7f0b3c2ca58badddc7d02804b26b615c4f 100644 (file)
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #include "ui/views/window/window_button_order_provider.h"
+#include "build/build_config.h"
 
 namespace views {
 
@@ -23,8 +24,10 @@ WindowButtonOrderProvider* WindowButtonOrderProvider::GetInstance() {
 // WindowButtonOrderProvider, protected:
 
 WindowButtonOrderProvider::WindowButtonOrderProvider() {
+#if !BUILDFLAG(IS_TIZEN)
   trailing_buttons_.push_back(views::FrameButton::kMinimize);
   trailing_buttons_.push_back(views::FrameButton::kMaximize);
+#endif  // BUILDFLAG(IS_TIZEN)
   trailing_buttons_.push_back(views::FrameButton::kClose);
 }