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