Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1136)

Unified Diff: ash/common/system/ime/tray_ime_chromeos.cc

Issue 2497813002: Modify Ash MD system menu layout for title rows (Closed)
Patch Set: trybots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/common/system/ime/tray_ime_chromeos.cc
diff --git a/ash/common/system/ime/tray_ime_chromeos.cc b/ash/common/system/ime/tray_ime_chromeos.cc
index 747a855d9a154d26459d8dba5f42791a51b6d370..1ffbf9425c0329059c612d067b66d9869943779d 100644
--- a/ash/common/system/ime/tray_ime_chromeos.cc
+++ b/ash/common/system/ime/tray_ime_chromeos.cc
@@ -21,6 +21,7 @@
#include "ash/common/system/tray/tray_popup_item_style.h"
#include "ash/common/system/tray/tray_popup_utils.h"
#include "ash/common/system/tray/tray_utils.h"
+#include "ash/common/system/tray/tri_view.h"
#include "ash/common/system/tray_accessibility.h"
#include "ash/common/wm_shell.h"
#include "ash/resources/vector_icons/vector_icons.h"
@@ -157,8 +158,16 @@ class IMEDetailedView : public ImeListView {
}
void CreateExtraTitleRowButtons() override {
- if (MaterialDesignController::IsSystemTrayMenuMaterial())
- settings_button_ = title_row()->AddSettingsButton(this, login_);
+ if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
+ // It is possible that the settings button has already been created
+ // through a previous call to Update().
+ if (settings_button_)
+ return;
+
+ tri_view()->SetContainerVisible(TriView::Container::END, true);
+ settings_button_ = CreateSettingsButton(login_);
+ tri_view()->AddView(TriView::Container::END, settings_button_);
+ }
}
void AppendSettings() {
« no previous file with comments | « ash/common/system/chromeos/network/network_state_list_detailed_view.cc ('k') | ash/common/system/tray/special_popup_row.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698