| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ui/app_list/views/folder_header_view.h" | 5 #include "ui/app_list/views/folder_header_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 FolderNameView() { | 39 FolderNameView() { |
| 40 SetBorder(views::Border::CreateEmptyBorder(1, 1, 1, 1)); | 40 SetBorder(views::Border::CreateEmptyBorder(1, 1, 1, 1)); |
| 41 const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250); | 41 const SkColor kFocusBorderColor = SkColorSetRGB(64, 128, 250); |
| 42 SetFocusPainter(views::Painter::CreateSolidFocusPainter( | 42 SetFocusPainter(views::Painter::CreateSolidFocusPainter( |
| 43 kFocusBorderColor, | 43 kFocusBorderColor, |
| 44 gfx::Insets(0, 0, 1, 1))); | 44 gfx::Insets(0, 0, 1, 1))); |
| 45 | 45 |
| 46 SetTextColor(kFolderTitleColor); | 46 SetTextColor(kFolderTitleColor); |
| 47 } | 47 } |
| 48 | 48 |
| 49 virtual ~FolderNameView() { | 49 ~FolderNameView() override {} |
| 50 } | |
| 51 | 50 |
| 52 private: | 51 private: |
| 53 DISALLOW_COPY_AND_ASSIGN(FolderNameView); | 52 DISALLOW_COPY_AND_ASSIGN(FolderNameView); |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 FolderHeaderView::FolderHeaderView(FolderHeaderViewDelegate* delegate) | 55 FolderHeaderView::FolderHeaderView(FolderHeaderViewDelegate* delegate) |
| 57 : folder_item_(NULL), | 56 : folder_item_(NULL), |
| 58 back_button_(new views::ImageButton(this)), | 57 back_button_(new views::ImageButton(this)), |
| 59 folder_name_view_(new FolderNameView), | 58 folder_name_view_(new FolderNameView), |
| 60 folder_name_placeholder_text_( | 59 folder_name_placeholder_text_( |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 void FolderHeaderView::ButtonPressed(views::Button* sender, | 229 void FolderHeaderView::ButtonPressed(views::Button* sender, |
| 231 const ui::Event& event) { | 230 const ui::Event& event) { |
| 232 delegate_->NavigateBack(folder_item_, event); | 231 delegate_->NavigateBack(folder_item_, event); |
| 233 } | 232 } |
| 234 | 233 |
| 235 void FolderHeaderView::ItemNameChanged() { | 234 void FolderHeaderView::ItemNameChanged() { |
| 236 Update(); | 235 Update(); |
| 237 } | 236 } |
| 238 | 237 |
| 239 } // namespace app_list | 238 } // namespace app_list |
| OLD | NEW |