| 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_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // Sets whether mouse events should be forwarded to |proxy_button_|. | 149 // Sets whether mouse events should be forwarded to |proxy_button_|. |
| 150 void SetForwardMouseEvents(bool forward); | 150 void SetForwardMouseEvents(bool forward); |
| 151 | 151 |
| 152 // views::View implementation. | 152 // views::View implementation. |
| 153 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; | 153 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; |
| 154 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 154 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
| 155 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 155 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 156 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 156 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
| 157 | 157 |
| 158 private: | 158 private: |
| 159 // Converts |event| to one suitable for |proxy_button_|. | |
| 160 static ui::MouseEvent ProxyEvent(const ui::MouseEvent& event); | |
| 161 | |
| 162 // Mouse events on |this| are sent to this button. | 159 // Mouse events on |this| are sent to this button. |
| 163 views::Button* proxy_button_; // Weak reference. | 160 views::Button* proxy_button_; // Weak reference. |
| 164 | 161 |
| 165 // When true, mouse events will be forwarded to |proxy_button_|. | 162 // When true, mouse events will be forwarded to |proxy_button_|. |
| 166 bool forward_mouse_events_; | 163 bool forward_mouse_events_; |
| 167 | 164 |
| 168 DISALLOW_COPY_AND_ASSIGN(SectionContainer); | 165 DISALLOW_COPY_AND_ASSIGN(SectionContainer); |
| 169 }; | 166 }; |
| 170 | 167 |
| 171 // A view that contains a suggestion (such as a known address) and a link to | 168 // A view that contains a suggestion (such as a known address) and a link to |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 319 |
| 323 // The focus manager for |window_|. | 320 // The focus manager for |window_|. |
| 324 views::FocusManager* focus_manager_; | 321 views::FocusManager* focus_manager_; |
| 325 | 322 |
| 326 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 323 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
| 327 }; | 324 }; |
| 328 | 325 |
| 329 } // namespace autofill | 326 } // namespace autofill |
| 330 | 327 |
| 331 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 328 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| OLD | NEW |