OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // Returns a multiplier used to calculate the actual width of the view based | 71 // Returns a multiplier used to calculate the actual width of the view based |
72 // on its desired width. This ranges from 0 for a zero-width view to 1 for a | 72 // on its desired width. This ranges from 0 for a zero-width view to 1 for a |
73 // full-width view and can be used to animate the width of the view. | 73 // full-width view and can be used to animate the width of the view. |
74 virtual double WidthMultiplier() const; | 74 virtual double WidthMultiplier() const; |
75 | 75 |
76 // Returns true when animation is in progress and is shrinking. | 76 // Returns true when animation is in progress and is shrinking. |
77 virtual bool IsShrinking() const; | 77 virtual bool IsShrinking() const; |
78 | 78 |
79 // The view has been activated by a user gesture such as spacebar. Returns | 79 // The view has been activated by a user gesture such as spacebar. Returns |
80 // true if some handling was performed. | 80 // true if some handling was performed. |
81 virtual bool OnActivate(); | 81 virtual bool OnActivate(const ui::Event& event); |
82 | 82 |
83 // views::View: | 83 // views::View: |
84 gfx::Size GetPreferredSize() const override; | 84 gfx::Size GetPreferredSize() const override; |
85 void Layout() override; | 85 void Layout() override; |
86 bool OnKeyPressed(const ui::KeyEvent& event) override; | 86 bool OnKeyPressed(const ui::KeyEvent& event) override; |
87 bool OnKeyReleased(const ui::KeyEvent& event) override; | 87 bool OnKeyReleased(const ui::KeyEvent& event) override; |
88 void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override; | 88 void OnNativeThemeChanged(const ui::NativeTheme* native_theme) override; |
89 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 89 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
90 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 90 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
91 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() | 91 std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight() |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // the native theme (so it responds to native theme updates). TODO(estade): | 138 // the native theme (so it responds to native theme updates). TODO(estade): |
139 // remove when MD is default. | 139 // remove when MD is default. |
140 SkColor parent_background_color_; | 140 SkColor parent_background_color_; |
141 | 141 |
142 bool should_show_background_; | 142 bool should_show_background_; |
143 | 143 |
144 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); | 144 DISALLOW_COPY_AND_ASSIGN(IconLabelBubbleView); |
145 }; | 145 }; |
146 | 146 |
147 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ | 147 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ICON_LABEL_BUBBLE_VIEW_H_ |
OLD | NEW |