Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 838253004: MacViews: Fix duplicate definition of ExtensionKeyBindingRegistry::SetShortcutHandlingSuspended (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@DragBookmarks2
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/views/panels/panel_view.h" 5 #include "chrome/browser/ui/views/panels/panel_view.h"
6 6
7 #include <map> 7 #include <map>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 #endif 586 #endif
587 } 587 }
588 } 588 }
589 589
590 bool PanelView::IsDrawingAttention() const { 590 bool PanelView::IsDrawingAttention() const {
591 return is_drawing_attention_; 591 return is_drawing_attention_;
592 } 592 }
593 593
594 void PanelView::HandlePanelKeyboardEvent( 594 void PanelView::HandlePanelKeyboardEvent(
595 const content::NativeWebKeyboardEvent& event) { 595 const content::NativeWebKeyboardEvent& event) {
596 views::FocusManager* focus_manager = GetFocusManager();
597 if (focus_manager->shortcut_handling_suspended())
598 return;
599
600 ui::Accelerator accelerator = 596 ui::Accelerator accelerator =
601 ui::GetAcceleratorFromNativeWebKeyboardEvent(event); 597 ui::GetAcceleratorFromNativeWebKeyboardEvent(event);
602 focus_manager->ProcessAccelerator(accelerator); 598 GetFocusManager()->ProcessAccelerator(accelerator);
603 } 599 }
604 600
605 void PanelView::FullScreenModeChanged(bool is_full_screen) { 601 void PanelView::FullScreenModeChanged(bool is_full_screen) {
606 if (is_full_screen) { 602 if (is_full_screen) {
607 if (window_->IsVisible() && always_on_top_) 603 if (window_->IsVisible() && always_on_top_)
608 window_->Hide(); 604 window_->Hide();
609 } else { 605 } else {
610 if (!window_->IsVisible()) { 606 if (!window_->IsVisible()) {
611 ShowPanelInactive(); 607 ShowPanelInactive();
612 608
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 // SWP_FRAMECHANGED flag must be called in order for the cached window data 1137 // SWP_FRAMECHANGED flag must be called in order for the cached window data
1142 // to be updated properly. 1138 // to be updated properly.
1143 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx 1139 // http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591(v=vs.85).a spx
1144 if (update_frame) { 1140 if (update_frame) {
1145 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0, 1141 ::SetWindowPos(native_window, NULL, 0, 0, 0, 0,
1146 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | 1142 SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
1147 SWP_NOZORDER | SWP_NOACTIVATE); 1143 SWP_NOZORDER | SWP_NOACTIVATE);
1148 } 1144 }
1149 } 1145 }
1150 #endif 1146 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698