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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 case IDC_RELOAD: | 545 case IDC_RELOAD: |
546 panel_host_->Reload(); | 546 panel_host_->Reload(); |
547 break; | 547 break; |
548 case IDC_RELOAD_IGNORING_CACHE: | 548 case IDC_RELOAD_IGNORING_CACHE: |
549 panel_host_->ReloadIgnoringCache(); | 549 panel_host_->ReloadIgnoringCache(); |
550 break; | 550 break; |
551 case IDC_STOP: | 551 case IDC_STOP: |
552 panel_host_->StopLoading(); | 552 panel_host_->StopLoading(); |
553 break; | 553 break; |
554 | 554 |
555 // Window management | |
556 case IDC_CLOSE_WINDOW: | |
557 content::RecordAction(UserMetricsAction("CloseWindow")); | |
558 Close(); | |
559 break; | |
560 case IDC_EXIT: | |
561 content::RecordAction(UserMetricsAction("Exit")); | |
562 browser::AttemptUserExit(); | |
563 break; | |
564 | |
565 // Clipboard | 555 // Clipboard |
566 case IDC_COPY: | 556 case IDC_COPY: |
567 content::RecordAction(UserMetricsAction("Copy")); | 557 content::RecordAction(UserMetricsAction("Copy")); |
568 native_panel_->PanelCopy(); | 558 native_panel_->PanelCopy(); |
569 break; | 559 break; |
570 case IDC_CUT: | 560 case IDC_CUT: |
571 content::RecordAction(UserMetricsAction("Cut")); | 561 content::RecordAction(UserMetricsAction("Cut")); |
572 native_panel_->PanelCut(); | 562 native_panel_->PanelCut(); |
573 break; | 563 break; |
574 case IDC_PASTE: | 564 case IDC_PASTE: |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 | 751 |
762 void Panel::LoadingStateChanged(bool is_loading) { | 752 void Panel::LoadingStateChanged(bool is_loading) { |
763 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); | 753 command_updater_.UpdateCommandEnabled(IDC_STOP, is_loading); |
764 native_panel_->UpdatePanelLoadingAnimations(is_loading); | 754 native_panel_->UpdatePanelLoadingAnimations(is_loading); |
765 UpdateTitleBar(); | 755 UpdateTitleBar(); |
766 } | 756 } |
767 | 757 |
768 void Panel::WebContentsFocused(content::WebContents* contents) { | 758 void Panel::WebContentsFocused(content::WebContents* contents) { |
769 native_panel_->PanelWebContentsFocused(contents); | 759 native_panel_->PanelWebContentsFocused(contents); |
770 } | 760 } |
OLD | NEW |