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 "content/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 int ConvertAuraEventFlagsToWebInputEventModifiers(int aura_event_flags) { | 449 int ConvertAuraEventFlagsToWebInputEventModifiers(int aura_event_flags) { |
450 int web_input_event_modifiers = 0; | 450 int web_input_event_modifiers = 0; |
451 if (aura_event_flags & ui::EF_SHIFT_DOWN) | 451 if (aura_event_flags & ui::EF_SHIFT_DOWN) |
452 web_input_event_modifiers |= blink::WebInputEvent::ShiftKey; | 452 web_input_event_modifiers |= blink::WebInputEvent::ShiftKey; |
453 if (aura_event_flags & ui::EF_CONTROL_DOWN) | 453 if (aura_event_flags & ui::EF_CONTROL_DOWN) |
454 web_input_event_modifiers |= blink::WebInputEvent::ControlKey; | 454 web_input_event_modifiers |= blink::WebInputEvent::ControlKey; |
455 if (aura_event_flags & ui::EF_ALT_DOWN) | 455 if (aura_event_flags & ui::EF_ALT_DOWN) |
456 web_input_event_modifiers |= blink::WebInputEvent::AltKey; | 456 web_input_event_modifiers |= blink::WebInputEvent::AltKey; |
457 if (aura_event_flags & ui::EF_COMMAND_DOWN) | 457 if (aura_event_flags & ui::EF_COMMAND_DOWN) |
458 web_input_event_modifiers |= blink::WebInputEvent::MetaKey; | 458 web_input_event_modifiers |= blink::WebInputEvent::MetaKey; |
| 459 if (aura_event_flags & ui::EF_LEFT_MOUSE_BUTTON) |
| 460 web_input_event_modifiers |= blink::WebInputEvent::LeftButtonDown; |
| 461 if (aura_event_flags & ui::EF_MIDDLE_MOUSE_BUTTON) |
| 462 web_input_event_modifiers |= blink::WebInputEvent::MiddleButtonDown; |
| 463 if (aura_event_flags & ui::EF_RIGHT_MOUSE_BUTTON) |
| 464 web_input_event_modifiers |= blink::WebInputEvent::RightButtonDown; |
459 return web_input_event_modifiers; | 465 return web_input_event_modifiers; |
460 } | 466 } |
461 | 467 |
462 } // namespace | 468 } // namespace |
463 | 469 |
464 class WebContentsViewAura::WindowObserver | 470 class WebContentsViewAura::WindowObserver |
465 : public aura::WindowObserver, public aura::WindowTreeHostObserver { | 471 : public aura::WindowObserver, public aura::WindowTreeHostObserver { |
466 public: | 472 public: |
467 explicit WindowObserver(WebContentsViewAura* view) | 473 explicit WindowObserver(WebContentsViewAura* view) |
468 : view_(view), | 474 : view_(view), |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 if (visible) { | 1641 if (visible) { |
1636 if (!web_contents_->should_normally_be_visible()) | 1642 if (!web_contents_->should_normally_be_visible()) |
1637 web_contents_->WasShown(); | 1643 web_contents_->WasShown(); |
1638 } else { | 1644 } else { |
1639 if (web_contents_->should_normally_be_visible()) | 1645 if (web_contents_->should_normally_be_visible()) |
1640 web_contents_->WasHidden(); | 1646 web_contents_->WasHidden(); |
1641 } | 1647 } |
1642 } | 1648 } |
1643 | 1649 |
1644 } // namespace content | 1650 } // namespace content |
OLD | NEW |