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 "chrome/browser/ui/panels/panel.h" | 5 #include "chrome/browser/ui/panels/panel.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 case IDC_RELOAD: | 542 case IDC_RELOAD: |
543 panel_host_->Reload(); | 543 panel_host_->Reload(); |
544 break; | 544 break; |
545 case IDC_RELOAD_IGNORING_CACHE: | 545 case IDC_RELOAD_IGNORING_CACHE: |
546 panel_host_->ReloadIgnoringCache(); | 546 panel_host_->ReloadIgnoringCache(); |
547 break; | 547 break; |
548 case IDC_STOP: | 548 case IDC_STOP: |
549 panel_host_->StopLoading(); | 549 panel_host_->StopLoading(); |
550 break; | 550 break; |
551 | 551 |
552 // Window management | |
553 case IDC_CLOSE_WINDOW: | |
554 content::RecordAction(UserMetricsAction("CloseWindow")); | |
555 Close(); | |
556 break; | |
557 case IDC_EXIT: | |
558 content::RecordAction(UserMetricsAction("Exit")); | |
559 browser::AttemptUserExit(); | |
560 break; | |
561 | |
562 // Clipboard | 552 // Clipboard |
563 case IDC_COPY: | 553 case IDC_COPY: |
564 content::RecordAction(UserMetricsAction("Copy")); | 554 content::RecordAction(UserMetricsAction("Copy")); |
565 native_panel_->PanelCopy(); | 555 native_panel_->PanelCopy(); |
566 break; | 556 break; |
567 case IDC_CUT: | 557 case IDC_CUT: |
568 content::RecordAction(UserMetricsAction("Cut")); | 558 content::RecordAction(UserMetricsAction("Cut")); |
569 native_panel_->PanelCut(); | 559 native_panel_->PanelCut(); |
570 break; | 560 break; |
571 case IDC_PASTE: | 561 case IDC_PASTE: |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 | 748 |
759 void Panel::LoadingStateChanged(bool is_loading) { | 749 void Panel::LoadingStateChanged(bool is_loading) { |
760 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); | 750 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); |
761 native_panel_->UpdatePanelLoadingAnimations(is_loading); | 751 native_panel_->UpdatePanelLoadingAnimations(is_loading); |
762 UpdateTitleBar(); | 752 UpdateTitleBar(); |
763 } | 753 } |
764 | 754 |
765 void Panel::WebContentsFocused(content::WebContents* contents) { | 755 void Panel::WebContentsFocused(content::WebContents* contents) { |
766 native_panel_->PanelWebContentsFocused(contents); | 756 native_panel_->PanelWebContentsFocused(contents); |
767 } | 757 } |
OLD | NEW |