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

Side by Side Diff: sky/engine/web/WebViewImpl.cpp

Issue 873963003: Remove more mouse-specific code (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes 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
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 case WebInputEvent::KeyDown: 506 case WebInputEvent::KeyDown:
507 case WebInputEvent::KeyUp: 507 case WebInputEvent::KeyUp:
508 return handleKeyEvent(static_cast<const WebKeyboardEvent&>(inputEvent)); 508 return handleKeyEvent(static_cast<const WebKeyboardEvent&>(inputEvent));
509 case WebInputEvent::Char: 509 case WebInputEvent::Char:
510 return handleCharEvent(static_cast<const WebKeyboardEvent&>(inputEvent)) ; 510 return handleCharEvent(static_cast<const WebKeyboardEvent&>(inputEvent)) ;
511 default: 511 default:
512 return false; 512 return false;
513 } 513 }
514 } 514 }
515 515
516 void WebViewImpl::mouseCaptureLost()
517 {
518 TRACE_EVENT_ASYNC_END0("input", "capturing mouse", this);
519 m_mouseCaptureNode = nullptr;
520 }
521
522 void WebViewImpl::setFocus(bool enable) 516 void WebViewImpl::setFocus(bool enable)
523 { 517 {
524 m_page->focusController().setFocused(enable); 518 m_page->focusController().setFocused(enable);
525 if (enable) { 519 if (enable) {
526 m_page->focusController().setActive(true); 520 m_page->focusController().setActive(true);
527 RefPtr<LocalFrame> focusedFrame = m_page->focusController().focusedFrame (); 521 RefPtr<LocalFrame> focusedFrame = m_page->focusController().focusedFrame ();
528 if (focusedFrame) { 522 if (focusedFrame) {
529 LocalFrame* localFrame = focusedFrame.get(); 523 LocalFrame* localFrame = focusedFrame.get();
530 Element* element = localFrame->document()->focusedElement(); 524 Element* element = localFrame->document()->focusedElement();
531 if (element && localFrame->selection().selection().isNone()) { 525 if (element && localFrame->selection().selection().isNone()) {
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, 1067 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState,
1074 bool isInitialState) { 1068 bool isInitialState) {
1075 if (!page()) 1069 if (!page())
1076 return; 1070 return;
1077 1071
1078 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden); 1072 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState = = WebPageVisibilityStateHidden);
1079 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 1073 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
1080 } 1074 }
1081 1075
1082 } // namespace blink 1076 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/WebViewImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698