| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/lock_screen_action/lock_screen_action_tray.h" | 5 #include "ash/system/lock_screen_action/lock_screen_action_tray.h" |
| 6 | 6 |
| 7 #include "ash/resources/vector_icons/vector_icons.h" | 7 #include "ash/resources/vector_icons/vector_icons.h" |
| 8 #include "ash/session/session_controller.h" | 8 #include "ash/session/session_controller.h" |
| 9 #include "ash/shelf/shelf_constants.h" | 9 #include "ash/shelf/shelf_constants.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 icon_ = new views::ImageView(); | 36 icon_ = new views::ImageView(); |
| 37 icon_->SetImage(CreateVectorIcon(kPaletteActionCreateNoteIcon, | 37 icon_->SetImage(CreateVectorIcon(kPaletteActionCreateNoteIcon, |
| 38 kTrayIconSize, kShelfIconColor)); | 38 kTrayIconSize, kShelfIconColor)); |
| 39 icon_->SetTooltipText( | 39 icon_->SetTooltipText( |
| 40 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CREATE_NOTE_ACTION)); | 40 l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CREATE_NOTE_ACTION)); |
| 41 AddChildView(icon_); | 41 AddChildView(icon_); |
| 42 } | 42 } |
| 43 | 43 |
| 44 ~NewNoteActionView() override {} | 44 ~NewNoteActionView() override {} |
| 45 | 45 |
| 46 gfx::Size GetPreferredSize() const override { | 46 gfx::Size CalculatePreferredSize() const override { |
| 47 return gfx::Size(kItemViewPreferredSize, kItemViewPreferredSize); | 47 return gfx::Size(kItemViewPreferredSize, kItemViewPreferredSize); |
| 48 } | 48 } |
| 49 | 49 |
| 50 const gfx::ImageSkia& GetImage() const { return icon_->GetImage(); } | 50 const gfx::ImageSkia& GetImage() const { return icon_->GetImage(); } |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 views::ImageView* icon_; | 53 views::ImageView* icon_; |
| 54 | 54 |
| 55 DISALLOW_COPY_AND_ASSIGN(NewNoteActionView); | 55 DISALLOW_COPY_AND_ASSIGN(NewNoteActionView); |
| 56 }; | 56 }; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 mojom::TrayActionState::kLaunching); | 127 mojom::TrayActionState::kLaunching); |
| 128 | 128 |
| 129 SetVisible(true); | 129 SetVisible(true); |
| 130 } | 130 } |
| 131 | 131 |
| 132 const gfx::ImageSkia& LockScreenActionTray::GetImageForTesting() const { | 132 const gfx::ImageSkia& LockScreenActionTray::GetImageForTesting() const { |
| 133 return new_note_action_view_->GetImage(); | 133 return new_note_action_view_->GetImage(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace ash | 136 } // namespace ash |
| OLD | NEW |