Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_COMMON_PALETTE_TOOL_H_ | |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_COMMON_PALETTE_TOOL_H_ | |
| 7 | |
| 8 #include "ash/common/system/chromeos/palette/palette_tool.h" | |
| 9 #include "ash/common/system/tray/hover_highlight_view.h" | |
| 10 #include "ash/common/system/tray/view_click_listener.h" | |
| 11 #include "base/strings/string16.h" | |
| 12 #include "ui/gfx/vector_icons_public.h" | |
| 13 | |
| 14 namespace ash { | |
| 15 | |
| 16 // A PaletteTool implementation with a standard view support. | |
| 17 class CommonPaletteTool : public PaletteTool, public ash::ViewClickListener { | |
| 18 protected: | |
| 19 explicit CommonPaletteTool(Delegate* delegate); | |
| 20 ~CommonPaletteTool() override; | |
| 21 | |
| 22 // PaletteTool overrides. | |
|
oshima
2016/07/22 19:31:50
nit: // PaletteTool:
jdufault
2016/07/26 22:24:30
Done.
| |
| 23 views::View* CreateView() override; | |
| 24 void OnViewDestroyed() override; | |
| 25 void OnEnable() override; | |
| 26 void OnDisable() override; | |
| 27 | |
| 28 // ViewClickListener overrides. | |
|
oshima
2016/07/22 19:31:50
ditto
jdufault
2016/07/26 22:24:30
Done.
| |
| 29 void OnViewClicked(views::View* sender) override; | |
| 30 | |
| 31 // Returns the icon used in the palette tray on the left-most edge of the | |
| 32 // tool. | |
| 33 virtual gfx::VectorIconId GetPaletteIconId() = 0; | |
| 34 | |
| 35 private: | |
| 36 // Creates a default view implementation to be returned by CreateView. | |
| 37 views::View* CreateDefaultView(const base::string16& name); | |
| 38 | |
| 39 HoverHighlightView* highlight_view_ = nullptr; | |
| 40 }; | |
|
oshima
2016/07/22 19:31:50
DISALLOW_COPY_AND_ASSIGN
jdufault
2016/07/26 22:24:30
Done.
| |
| 41 | |
| 42 } // namespace ash | |
| 43 | |
| 44 #endif // ASH_COMMON_SYSTEM_CHROMEOS_PALETTE_COMMON_PALETTE_TOOL_H_ | |
| OLD | NEW |