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/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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 | 566 |
567 void PanelView::HandlePanelKeyboardEvent( | 567 void PanelView::HandlePanelKeyboardEvent( |
568 const content::NativeWebKeyboardEvent& event) { | 568 const content::NativeWebKeyboardEvent& event) { |
569 views::FocusManager* focus_manager = GetFocusManager(); | 569 views::FocusManager* focus_manager = GetFocusManager(); |
570 if (focus_manager->shortcut_handling_suspended()) | 570 if (focus_manager->shortcut_handling_suspended()) |
571 return; | 571 return; |
572 | 572 |
573 ui::Accelerator accelerator( | 573 ui::Accelerator accelerator( |
574 static_cast<ui::KeyboardCode>(event.windowsKeyCode), | 574 static_cast<ui::KeyboardCode>(event.windowsKeyCode), |
575 content::GetModifiersFromNativeWebKeyboardEvent(event)); | 575 content::GetModifiersFromNativeWebKeyboardEvent(event)); |
576 if (event.type == WebKit::WebInputEvent::KeyUp) | 576 if (event.type == blink::WebInputEvent::KeyUp) |
577 accelerator.set_type(ui::ET_KEY_RELEASED); | 577 accelerator.set_type(ui::ET_KEY_RELEASED); |
578 focus_manager->ProcessAccelerator(accelerator); | 578 focus_manager->ProcessAccelerator(accelerator); |
579 } | 579 } |
580 | 580 |
581 void PanelView::FullScreenModeChanged(bool is_full_screen) { | 581 void PanelView::FullScreenModeChanged(bool is_full_screen) { |
582 if (is_full_screen) { | 582 if (is_full_screen) { |
583 if (window_->IsVisible() && always_on_top_) | 583 if (window_->IsVisible() && always_on_top_) |
584 window_->Hide(); | 584 window_->Hide(); |
585 } else { | 585 } else { |
586 if (!window_->IsVisible()) { | 586 if (!window_->IsVisible()) { |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 DCHECK(thickness_for_mouse_resizing > 0); | 1149 DCHECK(thickness_for_mouse_resizing > 0); |
1150 SkRegion* region = new SkRegion; | 1150 SkRegion* region = new SkRegion; |
1151 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); | 1151 region->op(0, 0, thickness_for_mouse_resizing, height, SkRegion::kUnion_Op); |
1152 region->op(width - thickness_for_mouse_resizing, 0, width, height, | 1152 region->op(width - thickness_for_mouse_resizing, 0, width, height, |
1153 SkRegion::kUnion_Op); | 1153 SkRegion::kUnion_Op); |
1154 region->op(0, height - thickness_for_mouse_resizing, width, height, | 1154 region->op(0, height - thickness_for_mouse_resizing, width, height, |
1155 SkRegion::kUnion_Op); | 1155 SkRegion::kUnion_Op); |
1156 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); | 1156 web_contents->GetRenderViewHost()->GetView()->SetClickthroughRegion(region); |
1157 #endif | 1157 #endif |
1158 } | 1158 } |
OLD | NEW |