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