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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 12321005: Enable touch based selection and editing for webpages behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
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/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 popup_child_host_view_(NULL), 625 popup_child_host_view_(NULL),
626 is_loading_(false), 626 is_loading_(false),
627 text_input_type_(ui::TEXT_INPUT_TYPE_NONE), 627 text_input_type_(ui::TEXT_INPUT_TYPE_NONE),
628 can_compose_inline_(true), 628 can_compose_inline_(true),
629 has_composition_text_(false), 629 has_composition_text_(false),
630 paint_canvas_(NULL), 630 paint_canvas_(NULL),
631 synthetic_move_sent_(false), 631 synthetic_move_sent_(false),
632 accelerated_compositing_state_changed_(false), 632 accelerated_compositing_state_changed_(false),
633 can_lock_compositor_(YES), 633 can_lock_compositor_(YES),
634 paint_observer_(NULL), 634 paint_observer_(NULL),
635 accessible_parent_(NULL) { 635 accessible_parent_(NULL),
636 touch_editing_client_(NULL) {
636 host_->SetView(this); 637 host_->SetView(this);
637 window_observer_.reset(new WindowObserver(this)); 638 window_observer_.reset(new WindowObserver(this));
638 aura::client::SetTooltipText(window_, &tooltip_); 639 aura::client::SetTooltipText(window_, &tooltip_);
639 aura::client::SetActivationDelegate(window_, this); 640 aura::client::SetActivationDelegate(window_, this);
640 aura::client::SetActivationChangeObserver(window_, this); 641 aura::client::SetActivationChangeObserver(window_, this);
641 aura::client::SetFocusChangeObserver(window_, this); 642 aura::client::SetFocusChangeObserver(window_, this);
642 gfx::Screen::GetScreenFor(window_)->AddObserver(this); 643 gfx::Screen::GetScreenFor(window_)->AddObserver(this);
643 #if defined(OS_WIN) 644 #if defined(OS_WIN)
644 transient_observer_.reset(new TransientWindowObserver(this)); 645 transient_observer_.reset(new TransientWindowObserver(this));
645 #endif 646 #endif
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 } 983 }
983 984
984 void RenderWidgetHostViewAura::TextInputStateChanged( 985 void RenderWidgetHostViewAura::TextInputStateChanged(
985 const ViewHostMsg_TextInputState_Params& params) { 986 const ViewHostMsg_TextInputState_Params& params) {
986 if (text_input_type_ != params.type || 987 if (text_input_type_ != params.type ||
987 can_compose_inline_ != params.can_compose_inline) { 988 can_compose_inline_ != params.can_compose_inline) {
988 text_input_type_ = params.type; 989 text_input_type_ = params.type;
989 can_compose_inline_ = params.can_compose_inline; 990 can_compose_inline_ = params.can_compose_inline;
990 if (GetInputMethod()) 991 if (GetInputMethod())
991 GetInputMethod()->OnTextInputTypeChanged(this); 992 GetInputMethod()->OnTextInputTypeChanged(this);
993 if (touch_editing_client_)
994 touch_editing_client_->OnTextInputTypeChanged(text_input_type_);
992 } 995 }
993 } 996 }
994 997
995 void RenderWidgetHostViewAura::ImeCancelComposition() { 998 void RenderWidgetHostViewAura::ImeCancelComposition() {
996 if (GetInputMethod()) 999 if (GetInputMethod())
997 GetInputMethod()->CancelComposition(this); 1000 GetInputMethod()->CancelComposition(this);
998 has_composition_text_ = false; 1001 has_composition_text_ = false;
999 } 1002 }
1000 1003
1001 void RenderWidgetHostViewAura::ImeCompositionRangeChanged( 1004 void RenderWidgetHostViewAura::ImeCompositionRangeChanged(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 const ViewHostMsg_SelectionBounds_Params& params) { 1100 const ViewHostMsg_SelectionBounds_Params& params) {
1098 if (selection_anchor_rect_ == params.anchor_rect && 1101 if (selection_anchor_rect_ == params.anchor_rect &&
1099 selection_focus_rect_ == params.focus_rect) 1102 selection_focus_rect_ == params.focus_rect)
1100 return; 1103 return;
1101 1104
1102 selection_anchor_rect_ = params.anchor_rect; 1105 selection_anchor_rect_ = params.anchor_rect;
1103 selection_focus_rect_ = params.focus_rect; 1106 selection_focus_rect_ = params.focus_rect;
1104 1107
1105 if (GetInputMethod()) 1108 if (GetInputMethod())
1106 GetInputMethod()->OnCaretBoundsChanged(this); 1109 GetInputMethod()->OnCaretBoundsChanged(this);
1110
1111 if (touch_editing_client_) {
1112 touch_editing_client_->OnSelectionOrCursorChanged(selection_anchor_rect_,
1113 selection_focus_rect_);
1114 }
1107 } 1115 }
1108 1116
1109 void RenderWidgetHostViewAura::ScrollOffsetChanged() { 1117 void RenderWidgetHostViewAura::ScrollOffsetChanged() {
1110 aura::RootWindow* root = window_->GetRootWindow(); 1118 aura::RootWindow* root = window_->GetRootWindow();
1111 if (!root) 1119 if (!root)
1112 return; 1120 return;
1113 aura::client::CursorClient* cursor_client = 1121 aura::client::CursorClient* cursor_client =
1114 aura::client::GetCursorClient(root); 1122 aura::client::GetCursorClient(root);
1115 if (cursor_client && !cursor_client->IsCursorVisible()) 1123 if (cursor_client && !cursor_client->IsCursorVisible())
1116 cursor_client->DisableMouseEvents(); 1124 cursor_client->DisableMouseEvents();
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1701 } 1709 }
1702 1710
1703 void RenderWidgetHostViewAura::GetScreenInfo(WebScreenInfo* results) { 1711 void RenderWidgetHostViewAura::GetScreenInfo(WebScreenInfo* results) {
1704 GetScreenInfoForWindow(results, window_->GetRootWindow() ? window_ : NULL); 1712 GetScreenInfoForWindow(results, window_->GetRootWindow() ? window_ : NULL);
1705 } 1713 }
1706 1714
1707 gfx::Rect RenderWidgetHostViewAura::GetBoundsInRootWindow() { 1715 gfx::Rect RenderWidgetHostViewAura::GetBoundsInRootWindow() {
1708 return window_->GetToplevelWindow()->GetBoundsInScreen(); 1716 return window_->GetToplevelWindow()->GetBoundsInScreen();
1709 } 1717 }
1710 1718
1719 void RenderWidgetHostViewAura::GestureEventAck(int gesture_event_type) {
1720 if (touch_editing_client_)
1721 touch_editing_client_->GestureEventAck(gesture_event_type);
1722 }
1723
1711 void RenderWidgetHostViewAura::ProcessAckedTouchEvent( 1724 void RenderWidgetHostViewAura::ProcessAckedTouchEvent(
1712 const WebKit::WebTouchEvent& touch_event, InputEventAckState ack_result) { 1725 const WebKit::WebTouchEvent& touch_event, InputEventAckState ack_result) {
1713 ScopedVector<ui::TouchEvent> events; 1726 ScopedVector<ui::TouchEvent> events;
1714 if (!MakeUITouchEventsFromWebTouchEvents(touch_event, &events, 1727 if (!MakeUITouchEventsFromWebTouchEvents(touch_event, &events,
1715 SCREEN_COORDINATES)) 1728 SCREEN_COORDINATES))
1716 return; 1729 return;
1717 1730
1718 aura::RootWindow* root = window_->GetRootWindow(); 1731 aura::RootWindow* root = window_->GetRootWindow();
1719 // |root| is NULL during tests. 1732 // |root| is NULL during tests.
1720 if (!root) 1733 if (!root)
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 const gfx::Point& location) { 2055 const gfx::Point& location) {
2043 return true; 2056 return true;
2044 } 2057 }
2045 2058
2046 bool RenderWidgetHostViewAura::CanFocus() { 2059 bool RenderWidgetHostViewAura::CanFocus() {
2047 return popup_type_ == WebKit::WebPopupTypeNone; 2060 return popup_type_ == WebKit::WebPopupTypeNone;
2048 } 2061 }
2049 2062
2050 void RenderWidgetHostViewAura::OnCaptureLost() { 2063 void RenderWidgetHostViewAura::OnCaptureLost() {
2051 host_->LostCapture(); 2064 host_->LostCapture();
2065 if (touch_editing_client_)
2066 touch_editing_client_->EndTouchEditing();
2052 } 2067 }
2053 2068
2054 void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) { 2069 void RenderWidgetHostViewAura::OnPaint(gfx::Canvas* canvas) {
2055 bool is_compositing_active = host_->is_accelerated_compositing_active(); 2070 bool is_compositing_active = host_->is_accelerated_compositing_active();
2056 bool has_backing_store = !!host_->GetBackingStore(false); 2071 bool has_backing_store = !!host_->GetBackingStore(false);
2057 if (is_compositing_active && current_dib_) { 2072 if (is_compositing_active && current_dib_) {
2058 const gfx::Size window_size = window_->bounds().size(); 2073 const gfx::Size window_size = window_->bounds().size();
2059 const gfx::Size& frame_size = last_swapped_surface_size_; 2074 const gfx::Size& frame_size = last_swapped_surface_size_;
2060 2075
2061 SkBitmap bitmap; 2076 SkBitmap bitmap;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 return scoped_refptr<ui::Texture>( 2176 return scoped_refptr<ui::Texture>(
2162 factory->CreateOwnedTexture( 2177 factory->CreateOwnedTexture(
2163 current_surface_->size(), current_device_scale_factor_, texture_id)); 2178 current_surface_->size(), current_device_scale_factor_, texture_id));
2164 } 2179 }
2165 2180
2166 //////////////////////////////////////////////////////////////////////////////// 2181 ////////////////////////////////////////////////////////////////////////////////
2167 // RenderWidgetHostViewAura, ui::EventHandler implementation: 2182 // RenderWidgetHostViewAura, ui::EventHandler implementation:
2168 2183
2169 void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) { 2184 void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) {
2170 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnKeyEvent"); 2185 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnKeyEvent");
2186 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event))
2187 return;
2188
2171 if (popup_child_host_view_ && popup_child_host_view_->NeedsInputGrab()) { 2189 if (popup_child_host_view_ && popup_child_host_view_->NeedsInputGrab()) {
2172 popup_child_host_view_->OnKeyEvent(event); 2190 popup_child_host_view_->OnKeyEvent(event);
2173 if (event->handled()) 2191 if (event->handled())
2174 return; 2192 return;
2175 } 2193 }
2176 2194
2177 // We need to handle the Escape key for Pepper Flash. 2195 // We need to handle the Escape key for Pepper Flash.
2178 if (is_fullscreen_ && event->key_code() == ui::VKEY_ESCAPE) { 2196 if (is_fullscreen_ && event->key_code() == ui::VKEY_ESCAPE) {
2179 // Focus the window we were created from. 2197 // Focus the window we were created from.
2180 if (host_tracker_.get() && !host_tracker_->windows().empty()) { 2198 if (host_tracker_.get() && !host_tracker_->windows().empty()) {
(...skipping 29 matching lines...) Expand all
2210 NativeWebKeyboardEvent webkit_event(event); 2228 NativeWebKeyboardEvent webkit_event(event);
2211 host_->ForwardKeyboardEvent(webkit_event); 2229 host_->ForwardKeyboardEvent(webkit_event);
2212 } 2230 }
2213 } 2231 }
2214 event->SetHandled(); 2232 event->SetHandled();
2215 } 2233 }
2216 2234
2217 void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) { 2235 void RenderWidgetHostViewAura::OnMouseEvent(ui::MouseEvent* event) {
2218 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnMouseEvent"); 2236 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnMouseEvent");
2219 2237
2238 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event))
2239 return;
2240
2220 if (mouse_locked_) { 2241 if (mouse_locked_) {
2221 // Hide the cursor if someone else has shown it. 2242 // Hide the cursor if someone else has shown it.
2222 aura::client::CursorClient* cursor_client = 2243 aura::client::CursorClient* cursor_client =
2223 aura::client::GetCursorClient(window_->GetRootWindow()); 2244 aura::client::GetCursorClient(window_->GetRootWindow());
2224 if (cursor_client && cursor_client->IsCursorVisible()) 2245 if (cursor_client && cursor_client->IsCursorVisible())
2225 cursor_client->DisableMouseEvents(); 2246 cursor_client->DisableMouseEvents();
2226 2247
2227 WebKit::WebMouseEvent mouse_event = MakeWebMouseEvent(event); 2248 WebKit::WebMouseEvent mouse_event = MakeWebMouseEvent(event);
2228 gfx::Point center(gfx::Rect(window_->bounds().size()).CenterPoint()); 2249 gfx::Point center(gfx::Rect(window_->bounds().size()).CenterPoint());
2229 2250
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 // TODO(pkotwicz): Find a better way of doing this. 2331 // TODO(pkotwicz): Find a better way of doing this.
2311 if (window_->parent()->delegate() && !(event->flags() & ui::EF_FROM_TOUCH)) 2332 if (window_->parent()->delegate() && !(event->flags() & ui::EF_FROM_TOUCH))
2312 window_->parent()->delegate()->OnMouseEvent(event); 2333 window_->parent()->delegate()->OnMouseEvent(event);
2313 2334
2314 if (!IsXButtonUpEvent(event)) 2335 if (!IsXButtonUpEvent(event))
2315 event->SetHandled(); 2336 event->SetHandled();
2316 } 2337 }
2317 2338
2318 void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) { 2339 void RenderWidgetHostViewAura::OnScrollEvent(ui::ScrollEvent* event) {
2319 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnScrollEvent"); 2340 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnScrollEvent");
2341 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event))
2342 return;
2343
2320 if (event->type() == ui::ET_SCROLL) { 2344 if (event->type() == ui::ET_SCROLL) {
2321 if (event->finger_count() != 2) 2345 if (event->finger_count() != 2)
2322 return; 2346 return;
2323 WebKit::WebGestureEvent gesture_event = 2347 WebKit::WebGestureEvent gesture_event =
2324 MakeWebGestureEventFlingCancel(); 2348 MakeWebGestureEventFlingCancel();
2325 host_->ForwardGestureEvent(gesture_event); 2349 host_->ForwardGestureEvent(gesture_event);
2326 WebKit::WebMouseWheelEvent mouse_wheel_event = 2350 WebKit::WebMouseWheelEvent mouse_wheel_event =
2327 MakeWebMouseWheelEvent(static_cast<ui::ScrollEvent*>(event)); 2351 MakeWebMouseWheelEvent(static_cast<ui::ScrollEvent*>(event));
2328 host_->ForwardWheelEvent(mouse_wheel_event); 2352 host_->ForwardWheelEvent(mouse_wheel_event);
2329 RecordAction(UserMetricsAction("TrackpadScroll")); 2353 RecordAction(UserMetricsAction("TrackpadScroll"));
2330 } else if (event->type() == ui::ET_SCROLL_FLING_START || 2354 } else if (event->type() == ui::ET_SCROLL_FLING_START ||
2331 event->type() == ui::ET_SCROLL_FLING_CANCEL) { 2355 event->type() == ui::ET_SCROLL_FLING_CANCEL) {
2332 WebKit::WebGestureEvent gesture_event = 2356 WebKit::WebGestureEvent gesture_event =
2333 MakeWebGestureEvent(static_cast<ui::ScrollEvent*>(event)); 2357 MakeWebGestureEvent(static_cast<ui::ScrollEvent*>(event));
2334 host_->ForwardGestureEvent(gesture_event); 2358 host_->ForwardGestureEvent(gesture_event);
2335 if (event->type() == ui::ET_SCROLL_FLING_START) 2359 if (event->type() == ui::ET_SCROLL_FLING_START)
2336 RecordAction(UserMetricsAction("TrackpadScrollFling")); 2360 RecordAction(UserMetricsAction("TrackpadScrollFling"));
2337 } 2361 }
2338 2362
2339 event->SetHandled(); 2363 event->SetHandled();
2340 } 2364 }
2341 2365
2342 void RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) { 2366 void RenderWidgetHostViewAura::OnTouchEvent(ui::TouchEvent* event) {
2343 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnTouchEvent"); 2367 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnTouchEvent");
2368 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event))
2369 return;
2370
2344 // Update the touch event first. 2371 // Update the touch event first.
2345 WebKit::WebTouchPoint* point = UpdateWebTouchEventFromUIEvent(*event, 2372 WebKit::WebTouchPoint* point = UpdateWebTouchEventFromUIEvent(*event,
2346 &touch_event_); 2373 &touch_event_);
2347 2374
2348 // Forward the touch event only if a touch point was updated, and there's a 2375 // Forward the touch event only if a touch point was updated, and there's a
2349 // touch-event handler in the page, and no other touch-event is in the queue. 2376 // touch-event handler in the page, and no other touch-event is in the queue.
2350 // It is important to always consume the event if there is a touch-event 2377 // It is important to always consume the event if there is a touch-event
2351 // handler in the page, or some touch-event is already in the queue, even if 2378 // handler in the page, or some touch-event is already in the queue, even if
2352 // no point has been updated, to make sure that this event does not get 2379 // no point has been updated, to make sure that this event does not get
2353 // processed by the gesture recognizer before the events in the queue. 2380 // processed by the gesture recognizer before the events in the queue.
(...skipping 10 matching lines...) Expand all
2364 void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) { 2391 void RenderWidgetHostViewAura::OnGestureEvent(ui::GestureEvent* event) {
2365 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnGestureEvent"); 2392 TRACE_EVENT0("browser", "RenderWidgetHostViewAura::OnGestureEvent");
2366 // Pinch gestures are currently disabled by default. See crbug.com/128477. 2393 // Pinch gestures are currently disabled by default. See crbug.com/128477.
2367 if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN || 2394 if ((event->type() == ui::ET_GESTURE_PINCH_BEGIN ||
2368 event->type() == ui::ET_GESTURE_PINCH_UPDATE || 2395 event->type() == ui::ET_GESTURE_PINCH_UPDATE ||
2369 event->type() == ui::ET_GESTURE_PINCH_END) && !ShouldSendPinchGesture()) { 2396 event->type() == ui::ET_GESTURE_PINCH_END) && !ShouldSendPinchGesture()) {
2370 event->SetHandled(); 2397 event->SetHandled();
2371 return; 2398 return;
2372 } 2399 }
2373 2400
2401 if (touch_editing_client_ && touch_editing_client_->HandleInputEvent(event))
2402 return;
2403
2374 RenderViewHostDelegate* delegate = NULL; 2404 RenderViewHostDelegate* delegate = NULL;
2375 if (popup_type_ == WebKit::WebPopupTypeNone && !is_fullscreen_) 2405 if (popup_type_ == WebKit::WebPopupTypeNone && !is_fullscreen_)
2376 delegate = RenderViewHost::From(host_)->GetDelegate(); 2406 delegate = RenderViewHost::From(host_)->GetDelegate();
2377 2407
2378 if (delegate && event->type() == ui::ET_GESTURE_BEGIN && 2408 if (delegate && event->type() == ui::ET_GESTURE_BEGIN &&
2379 event->details().touch_points() == 1) { 2409 event->details().touch_points() == 1) {
2380 delegate->HandleGestureBegin(); 2410 delegate->HandleGestureBegin();
2381 } 2411 }
2382 2412
2383 WebKit::WebGestureEvent gesture = MakeWebGestureEvent(event); 2413 WebKit::WebGestureEvent gesture = MakeWebGestureEvent(event);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
2475 2505
2476 DetachFromInputMethod(); 2506 DetachFromInputMethod();
2477 host_->SetInputMethodActive(false); 2507 host_->SetInputMethodActive(false);
2478 2508
2479 // If we lose the focus while fullscreen, close the window; Pepper Flash 2509 // If we lose the focus while fullscreen, close the window; Pepper Flash
2480 // won't do it for us (unlike NPAPI Flash). 2510 // won't do it for us (unlike NPAPI Flash).
2481 if (is_fullscreen_ && !in_shutdown_) { 2511 if (is_fullscreen_ && !in_shutdown_) {
2482 in_shutdown_ = true; 2512 in_shutdown_ = true;
2483 host_->Shutdown(); 2513 host_->Shutdown();
2484 } 2514 }
2515 if (touch_editing_client_)
2516 touch_editing_client_->EndTouchEditing();
2485 } 2517 }
2486 } 2518 }
2487 2519
2488 //////////////////////////////////////////////////////////////////////////////// 2520 ////////////////////////////////////////////////////////////////////////////////
2489 // RenderWidgetHostViewAura, aura::RootWindowObserver implementation: 2521 // RenderWidgetHostViewAura, aura::RootWindowObserver implementation:
2490 2522
2491 void RenderWidgetHostViewAura::OnRootWindowMoved(const aura::RootWindow* root, 2523 void RenderWidgetHostViewAura::OnRootWindowMoved(const aura::RootWindow* root,
2492 const gfx::Point& new_origin) { 2524 const gfx::Point& new_origin) {
2493 UpdateScreenInfo(window_); 2525 UpdateScreenInfo(window_);
2494 } 2526 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 host_->CompositingSurfaceUpdated(); 2645 host_->CompositingSurfaceUpdated();
2614 host_->ScheduleComposite(); 2646 host_->ScheduleComposite();
2615 } 2647 }
2616 2648
2617 //////////////////////////////////////////////////////////////////////////////// 2649 ////////////////////////////////////////////////////////////////////////////////
2618 // RenderWidgetHostViewAura, private: 2650 // RenderWidgetHostViewAura, private:
2619 2651
2620 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() { 2652 RenderWidgetHostViewAura::~RenderWidgetHostViewAura() {
2621 if (paint_observer_) 2653 if (paint_observer_)
2622 paint_observer_->OnViewDestroyed(); 2654 paint_observer_->OnViewDestroyed();
2655 if (touch_editing_client_)
2656 touch_editing_client_->OnViewDestroyed();
2623 if (!shared_surface_handle_.is_null()) { 2657 if (!shared_surface_handle_.is_null()) {
2624 ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); 2658 ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
2625 factory->DestroySharedSurfaceHandle(shared_surface_handle_); 2659 factory->DestroySharedSurfaceHandle(shared_surface_handle_);
2626 factory->RemoveObserver(this); 2660 factory->RemoveObserver(this);
2627 } 2661 }
2628 window_observer_.reset(); 2662 window_observer_.reset();
2629 #if defined(OS_WIN) 2663 #if defined(OS_WIN)
2630 transient_observer_.reset(); 2664 transient_observer_.reset();
2631 #endif 2665 #endif
2632 if (window_->GetRootWindow()) 2666 if (window_->GetRootWindow())
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 RenderWidgetHost* widget) { 2859 RenderWidgetHost* widget) {
2826 return new RenderWidgetHostViewAura(widget); 2860 return new RenderWidgetHostViewAura(widget);
2827 } 2861 }
2828 2862
2829 // static 2863 // static
2830 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 2864 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
2831 GetScreenInfoForWindow(results, NULL); 2865 GetScreenInfoForWindow(results, NULL);
2832 } 2866 }
2833 2867
2834 } // namespace content 2868 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698