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

Unified Diff: ash/wm/overview/window_selector_item.cc

Issue 331643004: Update the window labels if they change in overview mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Rob's nits Created 6 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
Index: ash/wm/overview/window_selector_item.cc
diff --git a/ash/wm/overview/window_selector_item.cc b/ash/wm/overview/window_selector_item.cc
index 7b0d872a9462a88a69efe6caccffec70ff599741..119152389a39d3d14815c91d3e1669aae23c372b 100644
--- a/ash/wm/overview/window_selector_item.cc
+++ b/ash/wm/overview/window_selector_item.cc
@@ -141,7 +141,6 @@ void WindowSelectorItem::SetBounds(aura::Window* root_window,
}
activate_window_button_->SetBounds(target_bounds);
- // TODO(nsatragno): Handle window title updates.
UpdateWindowLabels(target_bounds, root_window, animate);
gfx::Rect inset_bounds(target_bounds);
@@ -170,6 +169,14 @@ void WindowSelectorItem::ButtonPressed(views::Button* sender,
views::Widget::GetWidgetForNativeView(SelectionWindow())->Close();
}
+void WindowSelectorItem::OnWindowTitleChanged(aura::Window* window,
+ const base::string16& title) {
+ if (window == SelectionWindow()) {
+ static_cast<views::Label*>(
sky 2014/06/25 16:24:44 static_casts like this are often times fragile, in
Nina 2014/06/25 19:54:40 Okay, naturally I also replaced the other places i
+ window_label_->GetContentsView())->SetText(title);
+ }
+}
+
void WindowSelectorItem::UpdateCloseButtonBounds(aura::Window* root_window,
bool animate) {
gfx::RectF align_bounds(ScreenUtil::ConvertRectFromScreen(

Powered by Google App Engine
This is Rietveld 408576698