Commit 78240e99 authored by Alexander Dunaev's avatar Alexander Dunaev Committed by Commit Bot

Renamed the DBus appmenu classes appropriately.

This is a follow-up to [1] that fixes one compilation issue and also
renames the classes and files so they would match the purpose better.

No changes to functionality are intended.

[1] https://crrev.com/c/2289772

Bug: 990756
Change-Id: Ifffe052bff2d6bfcad81ce5fe38e6e5ad37dcb8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2317185
Auto-Submit: Alexander Dunaev <adunaev@igalia.com>
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791382}
parent 736f5348
...@@ -3072,10 +3072,10 @@ static_library("ui") { ...@@ -3072,10 +3072,10 @@ static_library("ui") {
if (use_dbus && (use_x11 || ozone_platform_x11)) { if (use_dbus && (use_x11 || ozone_platform_x11)) {
sources += [ sources += [
"views/frame/global_menu_bar_registrar_x11.cc", "views/frame/dbus_appmenu.cc",
"views/frame/global_menu_bar_registrar_x11.h", "views/frame/dbus_appmenu.h",
"views/frame/global_menu_bar_x11.cc", "views/frame/dbus_appmenu_registrar.cc",
"views/frame/global_menu_bar_x11.h", "views/frame/dbus_appmenu_registrar.h",
] ]
defines += [ "USE_DBUS_MENU" ] defines += [ "USE_DBUS_MENU" ]
deps += [ "//ui/gfx/x" ] deps += [ "//ui/gfx/x" ]
......
...@@ -6,7 +6,7 @@ specific_include_rules = { ...@@ -6,7 +6,7 @@ specific_include_rules = {
"browser_frame_ash\.*": [ "browser_frame_ash\.*": [
"+ash", "+ash",
], ],
"global_menu_bar_.*x11\.*": [ "dbus_appmenu\.*": [
"+dbus", "+dbus",
], ],
"top_controls_slide_controller_chromeos_browsertest.cc": [ "top_controls_slide_controller_chromeos_browsertest.cc": [
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "ui/ozone/public/ozone_platform.h" #include "ui/ozone/public/ozone_platform.h"
#include "ui/platform_window/extensions/x11_extension.h" #include "ui/platform_window/extensions/x11_extension.h"
#if defined(USE_DBUS_MENU)
namespace { namespace {
#if defined(USE_DBUS_MENU) #if defined(USE_DBUS_MENU)
...@@ -33,6 +35,8 @@ bool CreateGlobalMenuBar() { ...@@ -33,6 +35,8 @@ bool CreateGlobalMenuBar() {
} // namespace } // namespace
#endif // defined(USE_DBUS_MENU)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// BrowserDesktopWindowTreeHostLinux, public: // BrowserDesktopWindowTreeHostLinux, public:
...@@ -96,17 +100,16 @@ void BrowserDesktopWindowTreeHostLinux::Init( ...@@ -96,17 +100,16 @@ void BrowserDesktopWindowTreeHostLinux::Init(
#if defined(USE_DBUS_MENU) #if defined(USE_DBUS_MENU)
// We have now created our backing X11 window. We now need to (possibly) // We have now created our backing X11 window. We now need to (possibly)
// alert the desktop environment that there's a menu bar attached to it. // alert the desktop environment that there's a menu bar attached to it.
if (CreateGlobalMenuBar()) { if (CreateGlobalMenuBar()) {
global_menu_bar_x11_ = std::make_unique<GlobalMenuBarX11>( dbus_appmenu_ =
browser_view_, GetAcceleratedWidget()); std::make_unique<DbusAppmenu>(browser_view_, GetAcceleratedWidget());
} }
#endif #endif
} }
void BrowserDesktopWindowTreeHostLinux::CloseNow() { void BrowserDesktopWindowTreeHostLinux::CloseNow() {
#if defined(USE_DBUS_MENU) #if defined(USE_DBUS_MENU)
global_menu_bar_x11_.reset(); dbus_appmenu_.reset();
#endif #endif
DesktopWindowTreeHostLinuxImpl::CloseNow(); DesktopWindowTreeHostLinuxImpl::CloseNow();
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host.h" #include "chrome/browser/ui/views/frame/browser_desktop_window_tree_host.h"
#if defined(USE_DBUS_MENU) #if defined(USE_DBUS_MENU)
#include "chrome/browser/ui/views/frame/global_menu_bar_x11.h" // nogncheck #include "chrome/browser/ui/views/frame/dbus_appmenu.h" // nogncheck
#endif #endif
#if defined(USE_X11) #if defined(USE_X11)
...@@ -70,7 +70,7 @@ class BrowserDesktopWindowTreeHostLinux ...@@ -70,7 +70,7 @@ class BrowserDesktopWindowTreeHostLinux
// Each browser frame maintains its own menu bar object because the lower // Each browser frame maintains its own menu bar object because the lower
// level dbus protocol associates a xid to a menu bar; we can't map multiple // level dbus protocol associates a xid to a menu bar; we can't map multiple
// xids to the same menu bar. // xids to the same menu bar.
std::unique_ptr<GlobalMenuBarX11> global_menu_bar_x11_; std::unique_ptr<DbusAppmenu> dbus_appmenu_;
#endif #endif
DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostLinux); DISALLOW_COPY_AND_ASSIGN(BrowserDesktopWindowTreeHostLinux);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_ #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_H_
#define CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_ #define CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_H_
#include <map> #include <map>
#include <string> #include <string>
...@@ -33,7 +33,7 @@ class Accelerator; ...@@ -33,7 +33,7 @@ class Accelerator;
class Browser; class Browser;
class BrowserView; class BrowserView;
struct GlobalMenuBarCommand; struct DbusAppmenuCommand;
class Profile; class Profile;
// Controls the Mac style menu bar on Linux desktop environments. // Controls the Mac style menu bar on Linux desktop environments.
...@@ -42,22 +42,22 @@ class Profile; ...@@ -42,22 +42,22 @@ class Profile;
// depending on the active window. Unity has been discontinued but the menu // depending on the active window. Unity has been discontinued but the menu
// survived and is usually referred to as DBus AppMenu. There is support for it // survived and is usually referred to as DBus AppMenu. There is support for it
// in KDE Plasma in form of a widget that can be inserted into a panel. // in KDE Plasma in form of a widget that can be inserted into a panel.
class GlobalMenuBarX11 : public AvatarMenuObserver, class DbusAppmenu : public AvatarMenuObserver,
public BrowserListObserver, public BrowserListObserver,
public CommandObserver, public CommandObserver,
public history::TopSitesObserver, public history::TopSitesObserver,
public sessions::TabRestoreServiceObserver, public sessions::TabRestoreServiceObserver,
public ui::SimpleMenuModel::Delegate { public ui::SimpleMenuModel::Delegate {
public: public:
GlobalMenuBarX11(BrowserView* browser_view, uint32_t browser_frame_xid); DbusAppmenu(BrowserView* browser_view, uint32_t browser_frame_id);
~GlobalMenuBarX11() override; ~DbusAppmenu() override;
void Initialize(DbusMenu::InitializedCallback callback); void Initialize(DbusMenu::InitializedCallback callback);
// Creates the object path for DbusemenuServer which is attached to |window|. // Creates the object path for DbusemenuServer which is attached to |window|.
std::string GetPath() const; std::string GetPath() const;
uint32_t browser_frame_xid() const { return browser_frame_xid_; } uint32_t browser_frame_id() const { return browser_frame_id_; }
private: private:
struct HistoryItem; struct HistoryItem;
...@@ -65,7 +65,7 @@ class GlobalMenuBarX11 : public AvatarMenuObserver, ...@@ -65,7 +65,7 @@ class GlobalMenuBarX11 : public AvatarMenuObserver,
// Creates a whole menu defined with |commands| and titled with the string // Creates a whole menu defined with |commands| and titled with the string
// |string_id|. Then appends it to |root_menu_|. // |string_id|. Then appends it to |root_menu_|.
ui::SimpleMenuModel* BuildStaticMenu(int string_id, ui::SimpleMenuModel* BuildStaticMenu(int string_id,
const GlobalMenuBarCommand* commands); const DbusAppmenuCommand* commands);
// Creates a HistoryItem from the data in |entry|. // Creates a HistoryItem from the data in |entry|.
std::unique_ptr<HistoryItem> HistoryItemForTab( std::unique_ptr<HistoryItem> HistoryItemForTab(
...@@ -134,8 +134,8 @@ class GlobalMenuBarX11 : public AvatarMenuObserver, ...@@ -134,8 +134,8 @@ class GlobalMenuBarX11 : public AvatarMenuObserver,
// as plain int (and not as x11::Window) because it is never used for any // as plain int (and not as x11::Window) because it is never used for any
// calls to the X server, but it is always used for building string paths and // calls to the X server, but it is always used for building string paths and
// messages, for which it is converted to int (see GetPath() and calls to our // messages, for which it is converted to int (see GetPath() and calls to our
// browser_frame_xid() in GlobalMenuBarRegistrarX11). // browser_frame_id() in DbusAppmenuRegistrar).
const uint32_t browser_frame_xid_; const uint32_t browser_frame_id_;
// Has Initialize() been called? // Has Initialize() been called?
bool initialized_ = false; bool initialized_ = false;
...@@ -179,9 +179,9 @@ class GlobalMenuBarX11 : public AvatarMenuObserver, ...@@ -179,9 +179,9 @@ class GlobalMenuBarX11 : public AvatarMenuObserver,
int last_command_id_; int last_command_id_;
// For callbacks may be run after destruction. // For callbacks may be run after destruction.
base::WeakPtrFactory<GlobalMenuBarX11> weak_ptr_factory_{this}; base::WeakPtrFactory<DbusAppmenu> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarX11); DISALLOW_COPY_AND_ASSIGN(DbusAppmenu);
}; };
#endif // CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_X11_H_ #endif // CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_H_
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h" #include "chrome/browser/ui/views/frame/dbus_appmenu_registrar.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
#include "base/check_op.h" #include "base/check_op.h"
#include "base/notreached.h" #include "base/notreached.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "chrome/browser/ui/views/frame/global_menu_bar_x11.h" #include "chrome/browser/ui/views/frame/dbus_appmenu.h"
#include "components/dbus/thread_linux/dbus_thread_linux.h" #include "components/dbus/thread_linux/dbus_thread_linux.h"
#include "dbus/bus.h" #include "dbus/bus.h"
#include "dbus/message.h" #include "dbus/message.h"
...@@ -25,11 +25,11 @@ const char kAppMenuRegistrarInterface[] = "com.canonical.AppMenu.Registrar"; ...@@ -25,11 +25,11 @@ const char kAppMenuRegistrarInterface[] = "com.canonical.AppMenu.Registrar";
} // namespace } // namespace
// static // static
GlobalMenuBarRegistrarX11* GlobalMenuBarRegistrarX11::GetInstance() { DbusAppmenuRegistrar* DbusAppmenuRegistrar::GetInstance() {
return base::Singleton<GlobalMenuBarRegistrarX11>::get(); return base::Singleton<DbusAppmenuRegistrar>::get();
} }
void GlobalMenuBarRegistrarX11::OnMenuBarCreated(GlobalMenuBarX11* menu) { void DbusAppmenuRegistrar::OnMenuBarCreated(DbusAppmenu* menu) {
if (base::Contains(menus_, menu)) { if (base::Contains(menus_, menu)) {
NOTREACHED(); NOTREACHED();
return; return;
...@@ -39,13 +39,13 @@ void GlobalMenuBarRegistrarX11::OnMenuBarCreated(GlobalMenuBarX11* menu) { ...@@ -39,13 +39,13 @@ void GlobalMenuBarRegistrarX11::OnMenuBarCreated(GlobalMenuBarX11* menu) {
InitializeMenu(menu); InitializeMenu(menu);
} }
void GlobalMenuBarRegistrarX11::OnMenuBarDestroyed(GlobalMenuBarX11* menu) { void DbusAppmenuRegistrar::OnMenuBarDestroyed(DbusAppmenu* menu) {
DCHECK(base::Contains(menus_, menu)); DCHECK(base::Contains(menus_, menu));
if (menus_[menu] == kRegistered) { if (menus_[menu] == kRegistered) {
dbus::MethodCall method_call(kAppMenuRegistrarInterface, dbus::MethodCall method_call(kAppMenuRegistrarInterface,
"UnregisterWindow"); "UnregisterWindow");
dbus::MessageWriter writer(&method_call); dbus::MessageWriter writer(&method_call);
writer.AppendUint32(menu->browser_frame_xid()); writer.AppendUint32(menu->browser_frame_id());
registrar_proxy_->CallMethod(&method_call, registrar_proxy_->CallMethod(&method_call,
dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
base::DoNothing()); base::DoNothing());
...@@ -53,7 +53,7 @@ void GlobalMenuBarRegistrarX11::OnMenuBarDestroyed(GlobalMenuBarX11* menu) { ...@@ -53,7 +53,7 @@ void GlobalMenuBarRegistrarX11::OnMenuBarDestroyed(GlobalMenuBarX11* menu) {
menus_.erase(menu); menus_.erase(menu);
} }
GlobalMenuBarRegistrarX11::GlobalMenuBarRegistrarX11() { DbusAppmenuRegistrar::DbusAppmenuRegistrar() {
dbus::Bus::Options bus_options; dbus::Bus::Options bus_options;
bus_options.bus_type = dbus::Bus::SESSION; bus_options.bus_type = dbus::Bus::SESSION;
bus_options.connection_type = dbus::Bus::PRIVATE; bus_options.connection_type = dbus::Bus::PRIVATE;
...@@ -64,40 +64,39 @@ GlobalMenuBarRegistrarX11::GlobalMenuBarRegistrarX11() { ...@@ -64,40 +64,39 @@ GlobalMenuBarRegistrarX11::GlobalMenuBarRegistrarX11() {
kAppMenuRegistrarName, dbus::ObjectPath(kAppMenuRegistrarPath)); kAppMenuRegistrarName, dbus::ObjectPath(kAppMenuRegistrarPath));
dbus::Bus::ServiceOwnerChangeCallback callback = dbus::Bus::ServiceOwnerChangeCallback callback =
base::BindRepeating(&GlobalMenuBarRegistrarX11::OnNameOwnerChanged, base::BindRepeating(&DbusAppmenuRegistrar::OnNameOwnerChanged,
weak_ptr_factory_.GetWeakPtr()); weak_ptr_factory_.GetWeakPtr());
bus_->ListenForServiceOwnerChange(kAppMenuRegistrarName, callback); bus_->ListenForServiceOwnerChange(kAppMenuRegistrarName, callback);
bus_->GetServiceOwner(kAppMenuRegistrarName, callback); bus_->GetServiceOwner(kAppMenuRegistrarName, callback);
} }
GlobalMenuBarRegistrarX11::~GlobalMenuBarRegistrarX11() { DbusAppmenuRegistrar::~DbusAppmenuRegistrar() {
DCHECK(menus_.empty()); DCHECK(menus_.empty());
bus_->GetDBusTaskRunner()->PostTask( bus_->GetDBusTaskRunner()->PostTask(
FROM_HERE, base::BindOnce(&dbus::Bus::ShutdownAndBlock, bus_)); FROM_HERE, base::BindOnce(&dbus::Bus::ShutdownAndBlock, bus_));
} }
void GlobalMenuBarRegistrarX11::InitializeMenu(GlobalMenuBarX11* menu) { void DbusAppmenuRegistrar::InitializeMenu(DbusAppmenu* menu) {
DCHECK(base::Contains(menus_, menu)); DCHECK(base::Contains(menus_, menu));
DCHECK_EQ(menus_[menu], kUninitialized); DCHECK_EQ(menus_[menu], kUninitialized);
menus_[menu] = kInitializing; menus_[menu] = kInitializing;
menu->Initialize(base::BindOnce(&GlobalMenuBarRegistrarX11::OnMenuInitialized, menu->Initialize(base::BindOnce(&DbusAppmenuRegistrar::OnMenuInitialized,
weak_ptr_factory_.GetWeakPtr(), menu)); weak_ptr_factory_.GetWeakPtr(), menu));
} }
void GlobalMenuBarRegistrarX11::RegisterMenu(GlobalMenuBarX11* menu) { void DbusAppmenuRegistrar::RegisterMenu(DbusAppmenu* menu) {
DCHECK(base::Contains(menus_, menu)); DCHECK(base::Contains(menus_, menu));
DCHECK(menus_[menu] == kInitializeSucceeded || menus_[menu] == kRegistered); DCHECK(menus_[menu] == kInitializeSucceeded || menus_[menu] == kRegistered);
menus_[menu] = kRegistered; menus_[menu] = kRegistered;
dbus::MethodCall method_call(kAppMenuRegistrarInterface, "RegisterWindow"); dbus::MethodCall method_call(kAppMenuRegistrarInterface, "RegisterWindow");
dbus::MessageWriter writer(&method_call); dbus::MessageWriter writer(&method_call);
writer.AppendUint32(menu->browser_frame_xid()); writer.AppendUint32(menu->browser_frame_id());
writer.AppendObjectPath(dbus::ObjectPath(menu->GetPath())); writer.AppendObjectPath(dbus::ObjectPath(menu->GetPath()));
registrar_proxy_->CallMethod( registrar_proxy_->CallMethod(
&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::DoNothing()); &method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, base::DoNothing());
} }
void GlobalMenuBarRegistrarX11::OnMenuInitialized(GlobalMenuBarX11* menu, void DbusAppmenuRegistrar::OnMenuInitialized(DbusAppmenu* menu, bool success) {
bool success) {
DCHECK(base::Contains(menus_, menu)); DCHECK(base::Contains(menus_, menu));
DCHECK(menus_[menu] == kInitializing); DCHECK(menus_[menu] == kInitializing);
menus_[menu] = success ? kInitializeSucceeded : kInitializeFailed; menus_[menu] = success ? kInitializeSucceeded : kInitializeFailed;
...@@ -105,14 +104,14 @@ void GlobalMenuBarRegistrarX11::OnMenuInitialized(GlobalMenuBarX11* menu, ...@@ -105,14 +104,14 @@ void GlobalMenuBarRegistrarX11::OnMenuInitialized(GlobalMenuBarX11* menu,
RegisterMenu(menu); RegisterMenu(menu);
} }
void GlobalMenuBarRegistrarX11::OnNameOwnerChanged( void DbusAppmenuRegistrar::OnNameOwnerChanged(
const std::string& service_owner) { const std::string& service_owner) {
service_has_owner_ = !service_owner.empty(); service_has_owner_ = !service_owner.empty();
// If the name owner changed, we need to reregister all the live menus with // If the name owner changed, we need to reregister all the live menus with
// the system. // the system.
for (const auto& pair : menus_) { for (const auto& pair : menus_) {
GlobalMenuBarX11* menu = pair.first; DbusAppmenu* menu = pair.first;
switch (pair.second) { switch (pair.second) {
case kUninitialized: case kUninitialized:
if (service_has_owner_) if (service_has_owner_)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_REGISTRAR_H_
#define CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ #define CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_REGISTRAR_H_
#include <map> #include <map>
#include <string> #include <string>
...@@ -18,25 +18,25 @@ class Bus; ...@@ -18,25 +18,25 @@ class Bus;
class ObjectProxy; class ObjectProxy;
} // namespace dbus } // namespace dbus
class GlobalMenuBarX11; class DbusAppmenu;
// Advertises our menu bars to com.canonical.AppMenu.Registrar. // Advertises our menu bars to com.canonical.AppMenu.Registrar.
// //
// GlobalMenuBarRegistrarX11 is responsible for managing the dbus::Bus shared by // DbusAppmenuRegistrar is responsible for managing the dbus::Bus shared by
// each menu. We need a separate object to own the dbus channel and to // each menu. We need a separate object to own the dbus channel and to
// register/unregister the mapping between a menu and the com.canonical.dbusmenu // register/unregister the mapping between a menu and the com.canonical.dbusmenu
// instance we are offering. // instance we are offering.
class GlobalMenuBarRegistrarX11 { class DbusAppmenuRegistrar {
public: public:
static GlobalMenuBarRegistrarX11* GetInstance(); static DbusAppmenuRegistrar* GetInstance();
void OnMenuBarCreated(GlobalMenuBarX11* menu); void OnMenuBarCreated(DbusAppmenu* menu);
void OnMenuBarDestroyed(GlobalMenuBarX11* menu); void OnMenuBarDestroyed(DbusAppmenu* menu);
dbus::Bus* bus() { return bus_.get(); } dbus::Bus* bus() { return bus_.get(); }
private: private:
friend struct base::DefaultSingletonTraits<GlobalMenuBarRegistrarX11>; friend struct base::DefaultSingletonTraits<DbusAppmenuRegistrar>;
enum MenuState { enum MenuState {
// Initialize() hasn't been called. // Initialize() hasn't been called.
...@@ -56,15 +56,15 @@ class GlobalMenuBarRegistrarX11 { ...@@ -56,15 +56,15 @@ class GlobalMenuBarRegistrarX11 {
kRegistered, kRegistered,
}; };
GlobalMenuBarRegistrarX11(); DbusAppmenuRegistrar();
~GlobalMenuBarRegistrarX11(); ~DbusAppmenuRegistrar();
void InitializeMenu(GlobalMenuBarX11* menu); void InitializeMenu(DbusAppmenu* menu);
// Sends the actual message. // Sends the actual message.
void RegisterMenu(GlobalMenuBarX11* menu); void RegisterMenu(DbusAppmenu* menu);
void OnMenuInitialized(GlobalMenuBarX11* menu, bool success); void OnMenuInitialized(DbusAppmenu* menu, bool success);
void OnNameOwnerChanged(const std::string& service_owner); void OnNameOwnerChanged(const std::string& service_owner);
...@@ -74,11 +74,11 @@ class GlobalMenuBarRegistrarX11 { ...@@ -74,11 +74,11 @@ class GlobalMenuBarRegistrarX11 {
// Maps menus to flags that indicate if the menu has been successfully // Maps menus to flags that indicate if the menu has been successfully
// initialized. // initialized.
std::map<GlobalMenuBarX11*, MenuState> menus_; std::map<DbusAppmenu*, MenuState> menus_;
base::WeakPtrFactory<GlobalMenuBarRegistrarX11> weak_ptr_factory_{this}; base::WeakPtrFactory<DbusAppmenuRegistrar> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarRegistrarX11); DISALLOW_COPY_AND_ASSIGN(DbusAppmenuRegistrar);
}; };
#endif // CHROME_BROWSER_UI_VIEWS_FRAME_GLOBAL_MENU_BAR_REGISTRAR_X11_H_ #endif // CHROME_BROWSER_UI_VIEWS_FRAME_DBUS_APPMENU_REGISTRAR_H_
...@@ -45,7 +45,7 @@ PrefNotifierImpl::~PrefNotifierImpl() { ...@@ -45,7 +45,7 @@ PrefNotifierImpl::~PrefNotifierImpl() {
// preferences which are known to have subscriptions outliving the // preferences which are known to have subscriptions outliving the
// profile. // profile.
if ( if (
// For GlobalMenuBarX11, crbug.com/946668 // For DbusAppmenu, crbug.com/946668
pref_name == "bookmark_bar.show_on_all_tabs" || pref_name == "bookmark_bar.show_on_all_tabs" ||
// For BrowserWindowPropertyManager, crbug.com/942491 // For BrowserWindowPropertyManager, crbug.com/942491
pref_name == "profile.icon_version" || pref_name == "profile.icon_version" ||
......
...@@ -181,8 +181,8 @@ src:*ui/gtk/unity_service.cc ...@@ -181,8 +181,8 @@ src:*ui/gtk/unity_service.cc
src:*components/cronet/native/* src:*components/cronet/native/*
src:*third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc src:*third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
# chrome/browser/ui/views/frame/global_menu_bar_x11.cc # chrome/browser/ui/views/frame/dbus_appmenu.cc
fun:*GlobalMenuBarX11* fun:*dbus_appmenu*
# third_party/skia/include/gpu/gl/GrGLFunctions.h # third_party/skia/include/gpu/gl/GrGLFunctions.h
fun:*GrGLFunction* fun:*GrGLFunction*
......
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