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

Side by Side Diff: ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc

Issue 2055273004: Remove unused variables, ash/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/sysui/sysui_application.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h" 5 #include "ash/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/shelf/shelf_constants.h" 8 #include "ash/common/shelf/shelf_constants.h"
9 #include "ash/common/shelf/wm_shelf_util.h" 9 #include "ash/common/shelf/wm_shelf_util.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 views::CustomButton::STATE_NORMAL); 66 views::CustomButton::STATE_NORMAL);
67 int top_padding = (kTrayBarButtonWidth - image.height()) / 2; 67 int top_padding = (kTrayBarButtonWidth - image.height()) / 2;
68 int left_padding = (kTrayBarButtonWidth - image.width()) / 2; 68 int left_padding = (kTrayBarButtonWidth - image.width()) / 2;
69 int bottom_padding = kTrayBarButtonWidth - image.height() - top_padding; 69 int bottom_padding = kTrayBarButtonWidth - image.height() - top_padding;
70 int right_padding = kTrayBarButtonWidth - image.width() - left_padding; 70 int right_padding = kTrayBarButtonWidth - image.width() - left_padding;
71 71
72 // Square up the padding if horizontally aligned. Avoid extra padding when 72 // Square up the padding if horizontally aligned. Avoid extra padding when
73 // vertically aligned as the button would violate the width constraint on the 73 // vertically aligned as the button would violate the width constraint on the
74 // shelf. 74 // shelf.
75 if (IsHorizontalAlignment(alignment)) { 75 if (IsHorizontalAlignment(alignment)) {
76 gfx::Insets insets = button_->GetInsets();
77 int additional_padding = std::max(0, top_padding - left_padding); 76 int additional_padding = std::max(0, top_padding - left_padding);
78 left_padding += additional_padding; 77 left_padding += additional_padding;
79 right_padding += additional_padding; 78 right_padding += additional_padding;
80 } 79 }
81 80
82 button_->SetBorder(views::Border::CreateEmptyBorder( 81 button_->SetBorder(views::Border::CreateEmptyBorder(
83 top_padding, 82 top_padding,
84 left_padding, 83 left_padding,
85 bottom_padding, 84 bottom_padding,
86 right_padding)); 85 right_padding));
(...skipping 19 matching lines...) Expand all
106 const ui::Event& event) { 105 const ui::Event& event) {
107 DCHECK_EQ(button_, sender); 106 DCHECK_EQ(button_, sender);
108 PerformAction(event); 107 PerformAction(event);
109 } 108 }
110 109
111 void VirtualKeyboardTray::OnKeyboardEnabledStateChanged(bool new_value) { 110 void VirtualKeyboardTray::OnKeyboardEnabledStateChanged(bool new_value) {
112 SetVisible(Shell::GetInstance()->keyboard_ui()->IsEnabled()); 111 SetVisible(Shell::GetInstance()->keyboard_ui()->IsEnabled());
113 } 112 }
114 113
115 } // namespace ash 114 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/sysui/sysui_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698