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

Side by Side Diff: ash/common/system/chromeos/ime_menu/ime_menu_tray.cc

Issue 2723843002: Remove non-MD code from TrayBackgroundView (Closed)
Patch Set: Rebased Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" 5 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
6 6
7 #include "ash/common/accessibility_delegate.h" 7 #include "ash/common/accessibility_delegate.h"
8 #include "ash/common/ash_constants.h" 8 #include "ash/common/ash_constants.h"
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 scroller()->ClipHeightTo(height_range.start(), height_range.end()); 342 scroller()->ClipHeightTo(height_range.start(), height_range.end());
343 ImeListView::Layout(); 343 ImeListView::Layout();
344 } 344 }
345 345
346 DISALLOW_COPY_AND_ASSIGN(ImeMenuListView); 346 DISALLOW_COPY_AND_ASSIGN(ImeMenuListView);
347 }; 347 };
348 348
349 } // namespace 349 } // namespace
350 350
351 ImeMenuTray::ImeMenuTray(WmShelf* wm_shelf) 351 ImeMenuTray::ImeMenuTray(WmShelf* wm_shelf)
352 : TrayBackgroundView(wm_shelf), 352 : TrayBackgroundView(wm_shelf, true),
353 label_(new ImeMenuLabel()), 353 label_(new ImeMenuLabel()),
354 show_keyboard_(false), 354 show_keyboard_(false),
355 force_show_keyboard_(false), 355 force_show_keyboard_(false),
356 should_block_shelf_auto_hide_(false), 356 should_block_shelf_auto_hide_(false),
357 keyboard_suppressed_(false), 357 keyboard_suppressed_(false),
358 show_bubble_after_keyboard_hidden_(false) { 358 show_bubble_after_keyboard_hidden_(false) {
359 if (MaterialDesignController::IsShelfMaterial()) { 359 if (MaterialDesignController::IsShelfMaterial())
360 SetInkDropMode(InkDropMode::ON); 360 SetInkDropMode(InkDropMode::ON);
361 SetContentsBackground(false);
362 } else {
363 SetContentsBackground(true);
364 }
365 SetupLabelForTray(label_); 361 SetupLabelForTray(label_);
366 tray_container()->AddChildView(label_); 362 tray_container()->AddChildView(label_);
367 SystemTrayNotifier* tray_notifier = WmShell::Get()->system_tray_notifier(); 363 SystemTrayNotifier* tray_notifier = WmShell::Get()->system_tray_notifier();
368 tray_notifier->AddIMEObserver(this); 364 tray_notifier->AddIMEObserver(this);
369 tray_notifier->AddVirtualKeyboardObserver(this); 365 tray_notifier->AddVirtualKeyboardObserver(this);
370 } 366 }
371 367
372 ImeMenuTray::~ImeMenuTray() { 368 ImeMenuTray::~ImeMenuTray() {
373 if (bubble_) 369 if (bubble_)
374 bubble_->bubble_view()->reset_delegate(); 370 bubble_->bubble_view()->reset_delegate();
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 WmShell::Get()->system_tray_delegate()->GetCurrentIME(&current_ime_); 639 WmShell::Get()->system_tray_delegate()->GetCurrentIME(&current_ime_);
644 640
645 // Updates the tray label based on the current input method. 641 // Updates the tray label based on the current input method.
646 if (current_ime_.third_party) 642 if (current_ime_.third_party)
647 label_->SetText(current_ime_.short_name + base::UTF8ToUTF16("*")); 643 label_->SetText(current_ime_.short_name + base::UTF8ToUTF16("*"));
648 else 644 else
649 label_->SetText(current_ime_.short_name); 645 label_->SetText(current_ime_.short_name);
650 } 646 }
651 647
652 } // namespace ash 648 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698