| 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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 | 1190 |
| 1191 void WebContentsViewAura::OnKeyEvent(ui::KeyEvent* event) { | 1191 void WebContentsViewAura::OnKeyEvent(ui::KeyEvent* event) { |
| 1192 } | 1192 } |
| 1193 | 1193 |
| 1194 void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) { | 1194 void WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) { |
| 1195 if (!web_contents_->GetDelegate()) | 1195 if (!web_contents_->GetDelegate()) |
| 1196 return; | 1196 return; |
| 1197 | 1197 |
| 1198 switch (event->type()) { | 1198 switch (event->type()) { |
| 1199 case ui::ET_MOUSE_PRESSED: | 1199 case ui::ET_MOUSE_PRESSED: |
| 1200 web_contents_->GetDelegate()->ActivateContents(web_contents_); | 1200 web_contents_->GetDelegate()->ActivateContents(web_contents_, |
| 1201 true /* user_gesture */); |
| 1201 break; | 1202 break; |
| 1202 case ui::ET_MOUSE_MOVED: | 1203 case ui::ET_MOUSE_MOVED: |
| 1203 case ui::ET_MOUSE_EXITED: | 1204 case ui::ET_MOUSE_EXITED: |
| 1204 web_contents_->GetDelegate()->ContentsMouseEvent( | 1205 web_contents_->GetDelegate()->ContentsMouseEvent( |
| 1205 web_contents_, | 1206 web_contents_, |
| 1206 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 1207 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
| 1207 event->type() == ui::ET_MOUSE_MOVED); | 1208 event->type() == ui::ET_MOUSE_MOVED); |
| 1208 break; | 1209 break; |
| 1209 default: | 1210 default: |
| 1210 break; | 1211 break; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 if (visible) { | 1325 if (visible) { |
| 1325 if (!web_contents_->should_normally_be_visible()) | 1326 if (!web_contents_->should_normally_be_visible()) |
| 1326 web_contents_->WasShown(); | 1327 web_contents_->WasShown(); |
| 1327 } else { | 1328 } else { |
| 1328 if (web_contents_->should_normally_be_visible()) | 1329 if (web_contents_->should_normally_be_visible()) |
| 1329 web_contents_->WasHidden(); | 1330 web_contents_->WasHidden(); |
| 1330 } | 1331 } |
| 1331 } | 1332 } |
| 1332 | 1333 |
| 1333 } // namespace content | 1334 } // namespace content |
| OLD | NEW |