| 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 #include "ui/views/view.h" | 5 #include "ui/views/view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1947 // NOTREACHED assertion and verify accelerators works as | 1947 // NOTREACHED assertion and verify accelerators works as |
| 1948 // expected. | 1948 // expected. |
| 1949 #if defined(OS_WIN) | 1949 #if defined(OS_WIN) |
| 1950 NOTREACHED(); | 1950 NOTREACHED(); |
| 1951 #endif | 1951 #endif |
| 1952 return; | 1952 return; |
| 1953 } | 1953 } |
| 1954 for (std::vector<ui::Accelerator>::const_iterator i( | 1954 for (std::vector<ui::Accelerator>::const_iterator i( |
| 1955 accelerators_->begin() + registered_accelerator_count_); | 1955 accelerators_->begin() + registered_accelerator_count_); |
| 1956 i != accelerators_->end(); ++i) { | 1956 i != accelerators_->end(); ++i) { |
| 1957 accelerator_focus_manager_->RegisterAccelerator(*i, this); | 1957 accelerator_focus_manager_->RegisterAccelerator(*i, false, this); |
| 1958 } | 1958 } |
| 1959 registered_accelerator_count_ = accelerators_->size(); | 1959 registered_accelerator_count_ = accelerators_->size(); |
| 1960 } | 1960 } |
| 1961 | 1961 |
| 1962 void View::UnregisterAccelerators(bool leave_data_intact) { | 1962 void View::UnregisterAccelerators(bool leave_data_intact) { |
| 1963 if (!accelerators_.get()) | 1963 if (!accelerators_.get()) |
| 1964 return; | 1964 return; |
| 1965 | 1965 |
| 1966 if (GetWidget()) { | 1966 if (GetWidget()) { |
| 1967 if (accelerator_focus_manager_) { | 1967 if (accelerator_focus_manager_) { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2059 OSExchangeData data; | 2059 OSExchangeData data; |
| 2060 WriteDragData(press_pt, &data); | 2060 WriteDragData(press_pt, &data); |
| 2061 | 2061 |
| 2062 // Message the RootView to do the drag and drop. That way if we're removed | 2062 // Message the RootView to do the drag and drop. That way if we're removed |
| 2063 // the RootView can detect it and avoid calling us back. | 2063 // the RootView can detect it and avoid calling us back. |
| 2064 GetWidget()->RunShellDrag(this, data, drag_operations); | 2064 GetWidget()->RunShellDrag(this, data, drag_operations); |
| 2065 #endif // !defined(OS_MACOSX) | 2065 #endif // !defined(OS_MACOSX) |
| 2066 } | 2066 } |
| 2067 | 2067 |
| 2068 } // namespace views | 2068 } // namespace views |
| OLD | NEW |