OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/external_tab_container_win.h" | 5 #include "chrome/browser/external_tab_container_win.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/view_prop.h" | 10 #include "app/view_prop.h" |
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 | 1015 |
1016 focus_manager_ = GetFocusManager(); | 1016 focus_manager_ = GetFocusManager(); |
1017 DCHECK(focus_manager_); | 1017 DCHECK(focus_manager_); |
1018 | 1018 |
1019 // Let's fill our own accelerator table. | 1019 // Let's fill our own accelerator table. |
1020 for (int i = 0; i < count; ++i) { | 1020 for (int i = 0; i < count; ++i) { |
1021 bool alt_down = (accelerators[i].fVirt & FALT) == FALT; | 1021 bool alt_down = (accelerators[i].fVirt & FALT) == FALT; |
1022 bool ctrl_down = (accelerators[i].fVirt & FCONTROL) == FCONTROL; | 1022 bool ctrl_down = (accelerators[i].fVirt & FCONTROL) == FCONTROL; |
1023 bool shift_down = (accelerators[i].fVirt & FSHIFT) == FSHIFT; | 1023 bool shift_down = (accelerators[i].fVirt & FSHIFT) == FSHIFT; |
1024 views::Accelerator accelerator( | 1024 views::Accelerator accelerator( |
1025 static_cast<app::KeyboardCode>(accelerators[i].key), | 1025 static_cast<ui::KeyboardCode>(accelerators[i].key), |
1026 shift_down, ctrl_down, alt_down); | 1026 shift_down, ctrl_down, alt_down); |
1027 accelerator_table_[accelerator] = accelerators[i].cmd; | 1027 accelerator_table_[accelerator] = accelerators[i].cmd; |
1028 | 1028 |
1029 // Also register with the focus manager. | 1029 // Also register with the focus manager. |
1030 if (focus_manager_) | 1030 if (focus_manager_) |
1031 focus_manager_->RegisterAccelerator(accelerator, this); | 1031 focus_manager_->RegisterAccelerator(accelerator, this); |
1032 } | 1032 } |
1033 } | 1033 } |
1034 | 1034 |
1035 void ExternalTabContainer::OnReinitialize() { | 1035 void ExternalTabContainer::OnReinitialize() { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 | 1112 |
1113 if (disposition == CURRENT_TAB) { | 1113 if (disposition == CURRENT_TAB) { |
1114 DCHECK(route_all_top_level_navigations_); | 1114 DCHECK(route_all_top_level_navigations_); |
1115 disposition = NEW_FOREGROUND_TAB; | 1115 disposition = NEW_FOREGROUND_TAB; |
1116 } | 1116 } |
1117 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, | 1117 ExternalTabContainer::OpenURLFromTab(source, url, referrer, disposition, |
1118 transition); | 1118 transition); |
1119 // support only one navigation for a dummy tab before it is killed. | 1119 // support only one navigation for a dummy tab before it is killed. |
1120 ::DestroyWindow(GetNativeView()); | 1120 ::DestroyWindow(GetNativeView()); |
1121 } | 1121 } |
OLD | NEW |