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

Unified Diff: ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc

Issue 2103053004: mash: Convert virtual keyboard system tray item to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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/virtual_keyboard/virtual_keyboard_tray.h ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
diff --git a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc b/ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
similarity index 89%
rename from ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
rename to ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
index 55e884c1a8616bfffee6bc47daa26794bc7290cf..5e2391ff8370638d3d2e99f623ed125764b3276c 100644
--- a/ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
+++ b/ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
+#include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
+
+#include <algorithm>
#include "ash/common/keyboard/keyboard_ui.h"
#include "ash/common/material_design/material_design_controller.h"
@@ -10,7 +12,7 @@
#include "ash/common/shelf/wm_shelf_util.h"
#include "ash/common/system/tray/tray_constants.h"
#include "ash/common/system/tray/tray_utils.h"
-#include "ash/shell.h"
+#include "ash/common/wm_shell.h"
#include "grit/ash_resources.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
@@ -43,14 +45,14 @@ VirtualKeyboardTray::VirtualKeyboardTray(WmShelf* wm_shelf)
button_->SetFocusBehavior(FocusBehavior::NEVER);
SetContentsBackground();
// The Shell may not exist in some unit tests.
- if (Shell::HasInstance())
- Shell::GetInstance()->keyboard_ui()->AddObserver(this);
+ if (WmShell::HasInstance())
+ WmShell::Get()->keyboard_ui()->AddObserver(this);
}
VirtualKeyboardTray::~VirtualKeyboardTray() {
// The Shell may not exist in some unit tests.
- if (Shell::HasInstance())
- Shell::GetInstance()->keyboard_ui()->RemoveObserver(this);
+ if (WmShell::HasInstance())
+ WmShell::Get()->keyboard_ui()->RemoveObserver(this);
}
void VirtualKeyboardTray::SetShelfAlignment(ShelfAlignment alignment) {
@@ -86,7 +88,7 @@ void VirtualKeyboardTray::HideBubbleWithView(
void VirtualKeyboardTray::ClickedOutsideBubble() {}
bool VirtualKeyboardTray::PerformAction(const ui::Event& event) {
- Shell::GetInstance()->keyboard_ui()->Show();
+ WmShell::Get()->keyboard_ui()->Show();
return true;
}
@@ -97,7 +99,7 @@ void VirtualKeyboardTray::ButtonPressed(views::Button* sender,
}
void VirtualKeyboardTray::OnKeyboardEnabledStateChanged(bool new_value) {
- SetVisible(Shell::GetInstance()->keyboard_ui()->IsEnabled());
+ SetVisible(WmShell::Get()->keyboard_ui()->IsEnabled());
}
} // namespace ash
« no previous file with comments | « ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h ('k') | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698