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

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2931443003: Add support for Android spellcheck menu in Chrome/WebViews (Closed)
Patch Set: Respond to latest comments Created 3 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
9 * rights reserved. 9 * rights reserved.
10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 10 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
(...skipping 25 matching lines...) Expand all
36 #include "core/CoreProbeSink.h" 36 #include "core/CoreProbeSink.h"
37 #include "core/dom/ChildFrameDisconnector.h" 37 #include "core/dom/ChildFrameDisconnector.h"
38 #include "core/dom/DocumentType.h" 38 #include "core/dom/DocumentType.h"
39 #include "core/dom/StyleChangeReason.h" 39 #include "core/dom/StyleChangeReason.h"
40 #include "core/editing/EditingUtilities.h" 40 #include "core/editing/EditingUtilities.h"
41 #include "core/editing/Editor.h" 41 #include "core/editing/Editor.h"
42 #include "core/editing/FrameSelection.h" 42 #include "core/editing/FrameSelection.h"
43 #include "core/editing/InputMethodController.h" 43 #include "core/editing/InputMethodController.h"
44 #include "core/editing/serializers/Serialization.h" 44 #include "core/editing/serializers/Serialization.h"
45 #include "core/editing/spellcheck/SpellChecker.h" 45 #include "core/editing/spellcheck/SpellChecker.h"
46 #include "core/editing/suggestion/TextSuggestionController.h"
46 #include "core/events/Event.h" 47 #include "core/events/Event.h"
47 #include "core/frame/ContentSettingsClient.h" 48 #include "core/frame/ContentSettingsClient.h"
48 #include "core/frame/EventHandlerRegistry.h" 49 #include "core/frame/EventHandlerRegistry.h"
49 #include "core/frame/FrameConsole.h" 50 #include "core/frame/FrameConsole.h"
50 #include "core/frame/LocalDOMWindow.h" 51 #include "core/frame/LocalDOMWindow.h"
51 #include "core/frame/LocalFrameClient.h" 52 #include "core/frame/LocalFrameClient.h"
52 #include "core/frame/LocalFrameView.h" 53 #include "core/frame/LocalFrameView.h"
53 #include "core/frame/PerformanceMonitor.h" 54 #include "core/frame/PerformanceMonitor.h"
54 #include "core/frame/Settings.h" 55 #include "core/frame/Settings.h"
55 #include "core/html/HTMLFrameElementBase.h" 56 #include "core/html/HTMLFrameElementBase.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 visitor->Trace(dom_window_); 225 visitor->Trace(dom_window_);
225 visitor->Trace(page_popup_owner_); 226 visitor->Trace(page_popup_owner_);
226 visitor->Trace(script_controller_); 227 visitor->Trace(script_controller_);
227 visitor->Trace(editor_); 228 visitor->Trace(editor_);
228 visitor->Trace(spell_checker_); 229 visitor->Trace(spell_checker_);
229 visitor->Trace(selection_); 230 visitor->Trace(selection_);
230 visitor->Trace(event_handler_); 231 visitor->Trace(event_handler_);
231 visitor->Trace(console_); 232 visitor->Trace(console_);
232 visitor->Trace(input_method_controller_); 233 visitor->Trace(input_method_controller_);
233 visitor->Trace(frame_resource_coordinator_); 234 visitor->Trace(frame_resource_coordinator_);
235 visitor->Trace(text_suggestion_controller_);
234 Frame::Trace(visitor); 236 Frame::Trace(visitor);
235 Supplementable<LocalFrame>::Trace(visitor); 237 Supplementable<LocalFrame>::Trace(visitor);
236 } 238 }
237 239
238 void LocalFrame::Navigate(Document& origin_document, 240 void LocalFrame::Navigate(Document& origin_document,
239 const KURL& url, 241 const KURL& url,
240 bool replace_current_item, 242 bool replace_current_item,
241 UserGestureStatus user_gesture_status) { 243 UserGestureStatus user_gesture_status) {
242 navigation_scheduler_->ScheduleLocationChange(&origin_document, url, 244 navigation_scheduler_->ScheduleLocationChange(&origin_document, url,
243 replace_current_item); 245 replace_current_item);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 ChildFrameDisconnector(*document).Disconnect(); 388 ChildFrameDisconnector(*document).Disconnect();
387 } 389 }
388 390
389 void LocalFrame::DocumentAttached() { 391 void LocalFrame::DocumentAttached() {
390 DCHECK(GetDocument()); 392 DCHECK(GetDocument());
391 GetEditor().Clear(); 393 GetEditor().Clear();
392 GetEventHandler().Clear(); 394 GetEventHandler().Clear();
393 Selection().DocumentAttached(GetDocument()); 395 Selection().DocumentAttached(GetDocument());
394 GetInputMethodController().DocumentAttached(GetDocument()); 396 GetInputMethodController().DocumentAttached(GetDocument());
395 GetSpellChecker().DocumentAttached(GetDocument()); 397 GetSpellChecker().DocumentAttached(GetDocument());
398 GetTextSuggestionController().DocumentAttached(GetDocument());
396 } 399 }
397 400
398 Frame* LocalFrame::FindFrameForNavigation(const AtomicString& name, 401 Frame* LocalFrame::FindFrameForNavigation(const AtomicString& name,
399 LocalFrame& active_frame) { 402 LocalFrame& active_frame) {
400 Frame* frame = Tree().Find(name); 403 Frame* frame = Tree().Find(name);
401 if (!frame || !active_frame.CanNavigate(*frame)) 404 if (!frame || !active_frame.CanNavigate(*frame))
402 return nullptr; 405 return nullptr;
403 return frame; 406 return frame;
404 } 407 }
405 408
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 navigation_scheduler_(NavigationScheduler::Create(this)), 753 navigation_scheduler_(NavigationScheduler::Create(this)),
751 script_controller_(ScriptController::Create( 754 script_controller_(ScriptController::Create(
752 *this, 755 *this,
753 *static_cast<LocalWindowProxyManager*>(GetWindowProxyManager()))), 756 *static_cast<LocalWindowProxyManager*>(GetWindowProxyManager()))),
754 editor_(Editor::Create(*this)), 757 editor_(Editor::Create(*this)),
755 spell_checker_(SpellChecker::Create(*this)), 758 spell_checker_(SpellChecker::Create(*this)),
756 selection_(FrameSelection::Create(*this)), 759 selection_(FrameSelection::Create(*this)),
757 event_handler_(new EventHandler(*this)), 760 event_handler_(new EventHandler(*this)),
758 console_(FrameConsole::Create(*this)), 761 console_(FrameConsole::Create(*this)),
759 input_method_controller_(InputMethodController::Create(*this)), 762 input_method_controller_(InputMethodController::Create(*this)),
763 text_suggestion_controller_(new TextSuggestionController(*this)),
760 navigation_disable_count_(0), 764 navigation_disable_count_(0),
761 page_zoom_factor_(ParentPageZoomFactor(this)), 765 page_zoom_factor_(ParentPageZoomFactor(this)),
762 text_zoom_factor_(ParentTextZoomFactor(this)), 766 text_zoom_factor_(ParentTextZoomFactor(this)),
763 in_view_source_mode_(false), 767 in_view_source_mode_(false),
764 interface_registry_(interface_registry) { 768 interface_registry_(interface_registry) {
765 if (FrameResourceCoordinator::IsEnabled()) { 769 if (FrameResourceCoordinator::IsEnabled()) {
766 frame_resource_coordinator_ = 770 frame_resource_coordinator_ =
767 FrameResourceCoordinator::Create(client->GetInterfaceProvider()); 771 FrameResourceCoordinator::Create(client->GetInterfaceProvider());
768 } 772 }
769 if (IsLocalRoot()) { 773 if (IsLocalRoot()) {
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 void LocalFrame::SetViewportIntersectionFromParent( 1103 void LocalFrame::SetViewportIntersectionFromParent(
1100 const IntRect& viewport_intersection) { 1104 const IntRect& viewport_intersection) {
1101 if (remote_viewport_intersection_ != viewport_intersection) { 1105 if (remote_viewport_intersection_ != viewport_intersection) {
1102 remote_viewport_intersection_ = viewport_intersection; 1106 remote_viewport_intersection_ = viewport_intersection;
1103 if (View()) 1107 if (View())
1104 View()->ScheduleAnimation(); 1108 View()->ScheduleAnimation();
1105 } 1109 }
1106 } 1110 }
1107 1111
1108 } // namespace blink 1112 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698