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

Unified Diff: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc

Issue 2420393002: Block shelf auto hidden when opt-in IME menu is shown. (Closed)
Patch Set: Block shelf auto hide. Created 4 years, 2 months 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
« no previous file with comments | « ash/common/system/chromeos/ime_menu/ime_menu_tray.h ('k') | ash/common/system/status_area_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
diff --git a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
index a4542807b7c5283bda602694df1e9955eb762b65..2d2e42928ea76be6d32de9f3e4000d18f6a15a70 100644
--- a/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
+++ b/ash/common/system/chromeos/ime_menu/ime_menu_tray.cc
@@ -8,6 +8,7 @@
#include "ash/common/ash_constants.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/session/session_state_delegate.h"
+#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/shell_window_ids.h"
#include "ash/common/system/chromeos/ime_menu/ime_list_view.h"
@@ -277,7 +278,8 @@ ImeMenuTray::ImeMenuTray(WmShelf* wm_shelf)
: TrayBackgroundView(wm_shelf),
label_(new ImeMenuLabel()),
show_keyboard_(false),
- force_show_keyboard_(false) {
+ force_show_keyboard_(false),
+ should_block_shelf_auto_hide_(false) {
SetupLabelForTray(label_);
tray_container()->AddChildView(label_);
SetContentsBackground();
@@ -351,12 +353,14 @@ void ImeMenuTray::ShowImeMenuBubble() {
bubble_.reset(new TrayBubbleWrapper(this, bubble_view));
SetDrawBackgroundAsActive(true);
+ should_block_shelf_auto_hide_ = true;
}
void ImeMenuTray::HideImeMenuBubble() {
bubble_.reset();
ime_list_view_ = nullptr;
SetDrawBackgroundAsActive(false);
+ should_block_shelf_auto_hide_ = false;
}
bool ImeMenuTray::IsImeMenuBubbleShown() {
@@ -397,6 +401,10 @@ void ImeMenuTray::ShowKeyboardWithKeyset(const std::string& keyset) {
}
}
+bool ImeMenuTray::ShouldBlockShelfAutoHide() const {
+ return should_block_shelf_auto_hide_;
+}
+
void ImeMenuTray::SetShelfAlignment(ShelfAlignment alignment) {
TrayBackgroundView::SetShelfAlignment(alignment);
if (!MaterialDesignController::IsShelfMaterial())
« no previous file with comments | « ash/common/system/chromeos/ime_menu/ime_menu_tray.h ('k') | ash/common/system/status_area_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698