Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ |
| 7 | 7 |
| 8 #include "ui/views/controls/image_view.h" | 8 #include "ui/views/controls/image_view.h" |
| 9 | 9 |
| 10 class CommandUpdater; | 10 class CommandUpdater; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 31 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
| 32 virtual bool GetTooltipText(const gfx::Point& p, base::string16* tooltip) | 32 virtual bool GetTooltipText(const gfx::Point& p, base::string16* tooltip) |
| 33 const OVERRIDE; | 33 const OVERRIDE; |
| 34 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 34 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 35 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 35 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
| 36 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 36 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 37 | 37 |
| 38 // ui::EventHandler: | 38 // ui::EventHandler: |
| 39 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 39 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
| 40 | 40 |
| 41 bool suppress_mouse_released_action() const { | |
|
Peter Kasting
2014/07/23 17:58:23
Rather than add this, we could do the following, w
vasilii
2014/07/24 15:43:18
I didn't get your proposal. BubbleIconView is used
| |
| 42 return suppress_mouse_released_action_; | |
| 43 } | |
| 44 | |
| 41 private: | 45 private: |
| 42 // The CommandUpdater for the Browser object that owns the location bar. | 46 // The CommandUpdater for the Browser object that owns the location bar. |
| 43 CommandUpdater* command_updater_; | 47 CommandUpdater* command_updater_; |
| 44 | 48 |
| 45 // The command ID executed when the user clicks this icon. | 49 // The command ID executed when the user clicks this icon. |
| 46 const int command_id_; | 50 const int command_id_; |
| 47 | 51 |
| 48 // This is used to check if the bookmark bubble was showing during the mouse | 52 // This is used to check if the bookmark bubble was showing during the mouse |
| 49 // pressed event. If this is true then the mouse released event is ignored to | 53 // pressed event. If this is true then the mouse released event is ignored to |
| 50 // prevent the bubble from reshowing. | 54 // prevent the bubble from reshowing. |
| 51 bool suppress_mouse_released_action_; | 55 bool suppress_mouse_released_action_; |
| 52 | 56 |
| 53 DISALLOW_COPY_AND_ASSIGN(BubbleIconView); | 57 DISALLOW_COPY_AND_ASSIGN(BubbleIconView); |
| 54 }; | 58 }; |
| 55 | 59 |
| 56 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ | 60 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ |
| OLD | NEW |