| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "chrome/browser/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2628 bookmark_utils::ENTRY_POINT_ACCELERATOR, | 2628 bookmark_utils::ENTRY_POINT_ACCELERATOR, |
| 2629 bookmark_utils::ENTRY_POINT_LIMIT); | 2629 bookmark_utils::ENTRY_POINT_LIMIT); |
| 2630 | 2630 |
| 2631 #if defined(OS_CHROMEOS) | 2631 #if defined(OS_CHROMEOS) |
| 2632 // Collect information about the relative popularity of various accelerators | 2632 // Collect information about the relative popularity of various accelerators |
| 2633 // on Chrome OS. | 2633 // on Chrome OS. |
| 2634 switch (command_id) { | 2634 switch (command_id) { |
| 2635 case IDC_BACK: | 2635 case IDC_BACK: |
| 2636 if (key_code == ui::VKEY_BACK) | 2636 if (key_code == ui::VKEY_BACK) |
| 2637 content::RecordAction(UserMetricsAction("Accel_Back_Backspace")); | 2637 content::RecordAction(UserMetricsAction("Accel_Back_Backspace")); |
| 2638 else if (key_code == ui::VKEY_F1) | 2638 else if (key_code == ui::VKEY_BROWSER_BACK) |
| 2639 content::RecordAction(UserMetricsAction("Accel_Back_F1")); | 2639 content::RecordAction(UserMetricsAction("Accel_Back_F1")); |
| 2640 else if (key_code == ui::VKEY_LEFT) | 2640 else if (key_code == ui::VKEY_LEFT) |
| 2641 content::RecordAction(UserMetricsAction("Accel_Back_Left")); | 2641 content::RecordAction(UserMetricsAction("Accel_Back_Left")); |
| 2642 break; | 2642 break; |
| 2643 case IDC_FORWARD: | 2643 case IDC_FORWARD: |
| 2644 if (key_code == ui::VKEY_BACK) | 2644 if (key_code == ui::VKEY_BACK) |
| 2645 content::RecordAction(UserMetricsAction("Accel_Forward_Backspace")); | 2645 content::RecordAction(UserMetricsAction("Accel_Forward_Backspace")); |
| 2646 else if (key_code == ui::VKEY_F2) | 2646 else if (key_code == ui::VKEY_BROWSER_FORWARD) |
| 2647 content::RecordAction(UserMetricsAction("Accel_Forward_F2")); | 2647 content::RecordAction(UserMetricsAction("Accel_Forward_F2")); |
| 2648 else if (key_code == ui::VKEY_RIGHT) | 2648 else if (key_code == ui::VKEY_RIGHT) |
| 2649 content::RecordAction(UserMetricsAction("Accel_Forward_Right")); | 2649 content::RecordAction(UserMetricsAction("Accel_Forward_Right")); |
| 2650 break; | 2650 break; |
| 2651 case IDC_RELOAD: | 2651 case IDC_RELOAD: |
| 2652 case IDC_RELOAD_IGNORING_CACHE: | 2652 case IDC_RELOAD_IGNORING_CACHE: |
| 2653 if (key_code == ui::VKEY_R) | 2653 if (key_code == ui::VKEY_R) |
| 2654 content::RecordAction(UserMetricsAction("Accel_Reload_R")); | 2654 content::RecordAction(UserMetricsAction("Accel_Reload_R")); |
| 2655 else if (key_code == ui::VKEY_F3) | 2655 else if (key_code == ui::VKEY_BROWSER_REFRESH) |
| 2656 content::RecordAction(UserMetricsAction("Accel_Reload_F3")); | 2656 content::RecordAction(UserMetricsAction("Accel_Reload_F3")); |
| 2657 break; | 2657 break; |
| 2658 case IDC_FULLSCREEN: | 2658 case IDC_FULLSCREEN: |
| 2659 if (key_code == ui::VKEY_F4) | 2659 if (key_code == ui::VKEY_MEDIA_LAUNCH_APP2) |
| 2660 content::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); | 2660 content::RecordAction(UserMetricsAction("Accel_Fullscreen_F4")); |
| 2661 break; | 2661 break; |
| 2662 case IDC_FOCUS_LOCATION: | 2662 case IDC_FOCUS_LOCATION: |
| 2663 if (key_code == ui::VKEY_D) | 2663 if (key_code == ui::VKEY_D) |
| 2664 content::RecordAction(UserMetricsAction("Accel_FocusLocation_D")); | 2664 content::RecordAction(UserMetricsAction("Accel_FocusLocation_D")); |
| 2665 else if (key_code == ui::VKEY_L) | 2665 else if (key_code == ui::VKEY_L) |
| 2666 content::RecordAction(UserMetricsAction("Accel_FocusLocation_L")); | 2666 content::RecordAction(UserMetricsAction("Accel_FocusLocation_L")); |
| 2667 break; | 2667 break; |
| 2668 case IDC_FOCUS_SEARCH: | 2668 case IDC_FOCUS_SEARCH: |
| 2669 if (key_code == ui::VKEY_E) | 2669 if (key_code == ui::VKEY_E) |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2780 modal_browser->window()->Activate(); | 2780 modal_browser->window()->Activate(); |
| 2781 } | 2781 } |
| 2782 | 2782 |
| 2783 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2783 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
| 2784 } | 2784 } |
| 2785 | 2785 |
| 2786 void BrowserView::MaybeStackBookmarkBarAtTop() { | 2786 void BrowserView::MaybeStackBookmarkBarAtTop() { |
| 2787 if (bookmark_bar_view_.get()) | 2787 if (bookmark_bar_view_.get()) |
| 2788 bookmark_bar_view_->MaybeStackAtTop(); | 2788 bookmark_bar_view_->MaybeStackAtTop(); |
| 2789 } | 2789 } |
| OLD | NEW |