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

Side by Side Diff: chrome/renderer/render_view.h

Issue 6392045: Integrating Mac OS Grammar checker into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Caught up some more missings. I'm sorry for the distraction... Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_
6 #define CHROME_RENDERER_RENDER_VIEW_H_ 6 #define CHROME_RENDERER_RENDER_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "app/surface/transport_dib.h" 16 #include "app/surface/transport_dib.h"
17 #include "base/basictypes.h" 17 #include "base/basictypes.h"
18 #include "base/gtest_prod_util.h" 18 #include "base/gtest_prod_util.h"
19 #include "base/id_map.h"
19 #include "base/linked_ptr.h" 20 #include "base/linked_ptr.h"
20 #include "base/observer_list.h" 21 #include "base/observer_list.h"
21 #include "base/timer.h" 22 #include "base/timer.h"
22 #include "base/weak_ptr.h" 23 #include "base/weak_ptr.h"
23 #include "build/build_config.h" 24 #include "build/build_config.h"
24 #include "chrome/common/content_settings.h" 25 #include "chrome/common/content_settings.h"
25 #include "chrome/common/edit_command.h" 26 #include "chrome/common/edit_command.h"
26 #include "chrome/common/navigation_gesture.h" 27 #include "chrome/common/navigation_gesture.h"
27 #include "chrome/common/page_zoom.h" 28 #include "chrome/common/page_zoom.h"
28 #include "chrome/common/render_messages_params.h" 29 #include "chrome/common/render_messages_params.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 class WebImage; 133 class WebImage;
133 class WebInputElement; 134 class WebInputElement;
134 class WebKeyboardEvent; 135 class WebKeyboardEvent;
135 class WebMediaPlayer; 136 class WebMediaPlayer;
136 class WebMediaPlayerClient; 137 class WebMediaPlayerClient;
137 class WebMouseEvent; 138 class WebMouseEvent;
138 class WebPlugin; 139 class WebPlugin;
139 class WebSpeechInputController; 140 class WebSpeechInputController;
140 class WebSpeechInputListener; 141 class WebSpeechInputListener;
141 class WebStorageNamespace; 142 class WebStorageNamespace;
143 class WebTextCheckingResult;
142 class WebURLRequest; 144 class WebURLRequest;
143 class WebView; 145 class WebView;
144 struct WebContextMenuData; 146 struct WebContextMenuData;
145 struct WebFileChooserParams; 147 struct WebFileChooserParams;
146 struct WebFindOptions; 148 struct WebFindOptions;
147 struct WebPluginParams; 149 struct WebPluginParams;
148 struct WebPoint; 150 struct WebPoint;
149 struct WebWindowFeatures; 151 struct WebWindowFeatures;
150 } 152 }
151 153
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 virtual void didChangeLoadProgress(WebKit::WebFrame* frame, 413 virtual void didChangeLoadProgress(WebKit::WebFrame* frame,
412 double load_progress); 414 double load_progress);
413 virtual bool isSmartInsertDeleteEnabled(); 415 virtual bool isSmartInsertDeleteEnabled();
414 virtual bool isSelectTrailingWhitespaceEnabled(); 416 virtual bool isSelectTrailingWhitespaceEnabled();
415 virtual void didChangeSelection(bool is_selection_empty); 417 virtual void didChangeSelection(bool is_selection_empty);
416 virtual void didExecuteCommand(const WebKit::WebString& command_name); 418 virtual void didExecuteCommand(const WebKit::WebString& command_name);
417 virtual bool handleCurrentKeyboardEvent(); 419 virtual bool handleCurrentKeyboardEvent();
418 virtual void spellCheck(const WebKit::WebString& text, 420 virtual void spellCheck(const WebKit::WebString& text,
419 int& offset, 421 int& offset,
420 int& length); 422 int& length);
423 virtual void requestCheckingOfText(
pink (ping after 24hrs) 2011/02/11 17:33:40 I'd call this |-requestTextChecking|. It's more in
gmorrita 2011/02/17 11:39:44 I cannot change the name because this API override
424 const WebKit::WebString& text,
425 WebKit::WebTextCheckingCompletion* completion);
421 virtual WebKit::WebString autoCorrectWord( 426 virtual WebKit::WebString autoCorrectWord(
422 const WebKit::WebString& misspelled_word); 427 const WebKit::WebString& misspelled_word);
423 virtual void showSpellingUI(bool show); 428 virtual void showSpellingUI(bool show);
424 virtual bool isShowingSpellingUI(); 429 virtual bool isShowingSpellingUI();
425 virtual void updateSpellingUIWithMisspelledWord( 430 virtual void updateSpellingUIWithMisspelledWord(
426 const WebKit::WebString& word); 431 const WebKit::WebString& word);
427 virtual void continuousSpellCheckingEnabledStateChanged(); 432 virtual void continuousSpellCheckingEnabledStateChanged();
428 virtual bool runFileChooser( 433 virtual bool runFileChooser(
429 const WebKit::WebFileChooserParams& params, 434 const WebKit::WebFileChooserParams& params,
430 WebKit::WebFileChooserCompletion* chooser_completion); 435 WebKit::WebFileChooserCompletion* chooser_completion);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnHandleKeyboardEvent); 685 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, OnHandleKeyboardEvent);
681 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, InsertCharacters); 686 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, InsertCharacters);
682 #if defined(OS_MACOSX) 687 #if defined(OS_MACOSX)
683 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, MacTestCmdUp); 688 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, MacTestCmdUp);
684 #endif 689 #endif
685 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, JSBlockSentAfterPageLoad); 690 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, JSBlockSentAfterPageLoad);
686 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, UpdateTargetURLWithInvalidURL); 691 FRIEND_TEST_ALL_PREFIXES(RenderViewTest, UpdateTargetURLWithInvalidURL);
687 692
688 typedef std::map<GURL, ContentSettings> HostContentSettings; 693 typedef std::map<GURL, ContentSettings> HostContentSettings;
689 typedef std::map<GURL, double> HostZoomLevels; 694 typedef std::map<GURL, double> HostZoomLevels;
695 typedef IDMap<WebKit::WebTextCheckingCompletion> TextCheckCompletions;
690 696
691 // Cannot use std::set unfortunately since linked_ptr<> does not support 697 // Cannot use std::set unfortunately since linked_ptr<> does not support
692 // operator<. 698 // operator<.
693 typedef std::vector<linked_ptr<webkit_glue::ImageResourceFetcher> > 699 typedef std::vector<linked_ptr<webkit_glue::ImageResourceFetcher> >
694 ImageResourceFetcherList; 700 ImageResourceFetcherList;
695 701
696 // Identifies an accessibility notification from webkit. 702 // Identifies an accessibility notification from webkit.
697 struct RendererAccessibilityNotification { 703 struct RendererAccessibilityNotification {
698 public: 704 public:
699 bool ShouldIncludeChildren(); 705 bool ShouldIncludeChildren();
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 void OnSetWindowVisibility(bool visible); 927 void OnSetWindowVisibility(bool visible);
922 #endif 928 #endif
923 void OnSetZoomLevel(double zoom_level); 929 void OnSetZoomLevel(double zoom_level);
924 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 930 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
925 void OnShouldClose(); 931 void OnShouldClose();
926 void OnStop(); 932 void OnStop();
927 void OnStopFinding(const ViewMsg_StopFinding_Params& params); 933 void OnStopFinding(const ViewMsg_StopFinding_Params& params);
928 void OnThemeChanged(); 934 void OnThemeChanged();
929 void OnToggleSpellCheck(); 935 void OnToggleSpellCheck();
930 void OnToggleSpellPanel(bool is_currently_visible); 936 void OnToggleSpellPanel(bool is_currently_visible);
937 void OnRespondTextCheck(
938 int identifier,
939 int tag,
940 const std::vector<WebKit::WebTextCheckingResult>& results);
941
931 void OnUndo(); 942 void OnUndo();
932 void OnUpdateBrowserWindowId(int window_id); 943 void OnUpdateBrowserWindowId(int window_id);
933 void OnUpdateTargetURLAck(); 944 void OnUpdateTargetURLAck();
934 void OnUpdateWebPreferences(const WebPreferences& prefs); 945 void OnUpdateWebPreferences(const WebPreferences& prefs);
935 #if defined(OS_MACOSX) 946 #if defined(OS_MACOSX)
936 void OnWindowFrameChanged(const gfx::Rect& window_frame, 947 void OnWindowFrameChanged(const gfx::Rect& window_frame,
937 const gfx::Rect& view_frame); 948 const gfx::Rect& view_frame);
938 void OnSelectPopupMenuItem(int selected_index); 949 void OnSelectPopupMenuItem(int selected_index);
939 #endif 950 #endif
940 void OnZoom(PageZoom::Function function); 951 void OnZoom(PageZoom::Function function);
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 // The node that the context menu was pressed over. 1452 // The node that the context menu was pressed over.
1442 WebKit::WebNode context_menu_node_; 1453 WebKit::WebNode context_menu_node_;
1443 1454
1444 // Reports load progress to the browser. 1455 // Reports load progress to the browser.
1445 scoped_ptr<LoadProgressTracker> load_progress_tracker_; 1456 scoped_ptr<LoadProgressTracker> load_progress_tracker_;
1446 1457
1447 // All the registered observers. We expect this list to be small, so vector 1458 // All the registered observers. We expect this list to be small, so vector
1448 // is fine. 1459 // is fine.
1449 ObserverList<RenderViewObserver> observers_; 1460 ObserverList<RenderViewObserver> observers_;
1450 1461
1462 // Holds ongoing spellchecking operations, assigns IDs
pink (ping after 24hrs) 2011/02/11 17:33:40 dont wrap early. Put as much of the comment on thi
gmorrita 2011/02/17 11:39:44 Done.
1463 // for the IPC routing.
1464 TextCheckCompletions text_check_completions_;
1465
1451 // --------------------------------------------------------------------------- 1466 // ---------------------------------------------------------------------------
1452 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 1467 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
1453 // sections rather than throwing it randomly at the end. If you're adding a 1468 // sections rather than throwing it randomly at the end. If you're adding a
1454 // bunch of stuff, you should probably create a helper class and put your 1469 // bunch of stuff, you should probably create a helper class and put your
1455 // data and methods on that to avoid bloating RenderView more. You can use 1470 // data and methods on that to avoid bloating RenderView more. You can use
1456 // the Observer interface to filter IPC messages and receive frame change 1471 // the Observer interface to filter IPC messages and receive frame change
1457 // notifications. 1472 // notifications.
1458 // --------------------------------------------------------------------------- 1473 // ---------------------------------------------------------------------------
1459 1474
1460 DISALLOW_COPY_AND_ASSIGN(RenderView); 1475 DISALLOW_COPY_AND_ASSIGN(RenderView);
1461 }; 1476 };
1462 1477
1463 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 1478 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698