| 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 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" | 5 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
| 10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 247 |
| 248 // Need to explicitly clear mouse handler so that events get sent | 248 // Need to explicitly clear mouse handler so that events get sent |
| 249 // properly after the menu finishes running. If we don't do this, then | 249 // properly after the menu finishes running. If we don't do this, then |
| 250 // the first click to other parts of the UI is eaten. | 250 // the first click to other parts of the UI is eaten. |
| 251 SetMouseHandler(nullptr); | 251 SetMouseHandler(nullptr); |
| 252 | 252 |
| 253 // Set the state back to normal after the drop down menu is closed. | 253 // Set the state back to normal after the drop down menu is closed. |
| 254 if (state() != STATE_DISABLED) | 254 if (state() != STATE_DISABLED) |
| 255 SetState(STATE_NORMAL); | 255 SetState(STATE_NORMAL); |
| 256 | 256 |
| 257 menu_runner_.reset(); |
| 257 menu_model_adapter_.reset(); | 258 menu_model_adapter_.reset(); |
| 258 } | 259 } |
| 259 | 260 |
| 260 const char* ToolbarButton::GetClassName() const { | 261 const char* ToolbarButton::GetClassName() const { |
| 261 return "ToolbarButton"; | 262 return "ToolbarButton"; |
| 262 } | 263 } |
| OLD | NEW |