| OLD | NEW | 
|    1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2009 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |    5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 
|    6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |    6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 
|    7  |    7  | 
|    8 #include <string> |    8 #include <string> | 
|    9 #include <vector> |    9 #include <vector> | 
|   10  |   10  | 
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  205   void StartFinding(int request_id, |  205   void StartFinding(int request_id, | 
|  206                     const string16& search_string, |  206                     const string16& search_string, | 
|  207                     bool forward, |  207                     bool forward, | 
|  208                     bool match_case, |  208                     bool match_case, | 
|  209                     bool find_next); |  209                     bool find_next); | 
|  210  |  210  | 
|  211   // Cancel a pending find operation. If |clear_selection| is true, it will also |  211   // Cancel a pending find operation. If |clear_selection| is true, it will also | 
|  212   // clear the selection on the focused frame. |  212   // clear the selection on the focused frame. | 
|  213   void StopFinding(bool clear_selection); |  213   void StopFinding(bool clear_selection); | 
|  214  |  214  | 
|  215   // Get the most probable language of the text content in the tab. This sends |  | 
|  216   // a message to the render view to get the content of the page as text. The |  | 
|  217   // caller gets the language via the NotificationService by registering to the |  | 
|  218   // NotificationType TAB_LANGUAGE_DETERMINED. |  | 
|  219   void GetPageLanguage(); |  | 
|  220  |  | 
|  221   // Change the zoom level of a page. |  215   // Change the zoom level of a page. | 
|  222   void Zoom(PageZoom::Function function); |  216   void Zoom(PageZoom::Function function); | 
|  223  |  217  | 
|  224   // Change the encoding of the page. |  218   // Change the encoding of the page. | 
|  225   void SetPageEncoding(const std::string& encoding); |  219   void SetPageEncoding(const std::string& encoding); | 
|  226  |  220  | 
|  227   // Reset any override encoding on the page and change back to default. |  221   // Reset any override encoding on the page and change back to default. | 
|  228   void ResetPageEncodingToDefault(); |  222   void ResetPageEncodingToDefault(); | 
|  229  |  223  | 
|  230   // Change the alternate error page URL.  An empty GURL disables the use of |  224   // Change the alternate error page URL.  An empty GURL disables the use of | 
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  416   virtual void ForwardEditCommandsForNextKeyEvent( |  410   virtual void ForwardEditCommandsForNextKeyEvent( | 
|  417       const EditCommands& edit_commands); |  411       const EditCommands& edit_commands); | 
|  418   virtual gfx::Rect GetRootWindowResizerRect() const; |  412   virtual gfx::Rect GetRootWindowResizerRect() const; | 
|  419  |  413  | 
|  420   // Creates a new RenderView with the given route id. |  414   // Creates a new RenderView with the given route id. | 
|  421   void CreateNewWindow(int route_id); |  415   void CreateNewWindow(int route_id); | 
|  422  |  416  | 
|  423   // Creates a new RenderWidget with the given route id. |  417   // Creates a new RenderWidget with the given route id. | 
|  424   void CreateNewWidget(int route_id, bool activatable); |  418   void CreateNewWidget(int route_id, bool activatable); | 
|  425  |  419  | 
|  426   // Send the response to an extension api call. |  420   // Sends the response to an extension api call. | 
|  427   void SendExtensionResponse(int request_id, bool success, |  421   void SendExtensionResponse(int request_id, bool success, | 
|  428                              const std::string& response, |  422                              const std::string& response, | 
|  429                              const std::string& error); |  423                              const std::string& error); | 
|  430  |  424  | 
|  431   // Send a response to an extension api call that it was blocked for lack of |  425   // Sends a response to an extension api call that it was blocked for lack of | 
|  432   // permission. |  426   // permission. | 
|  433   void BlockExtensionRequest(int request_id); |  427   void BlockExtensionRequest(int request_id); | 
|  434  |  428  | 
|  435   // Notify the renderer that its view type has changed. |  429   // Notifies the renderer that its view type has changed. | 
|  436   void ViewTypeChanged(ViewType::Type type); |  430   void ViewTypeChanged(ViewType::Type type); | 
|  437  |  431  | 
|  438   // Tell renderer which browser window it is being attached to. |  432   // Tells the renderer which browser window it is being attached to. | 
|  439   void UpdateBrowserWindowId(int window_id); |  433   void UpdateBrowserWindowId(int window_id); | 
|  440  |  434  | 
|  441   // Tell render view that custom context action has been selected. |  435   // Tells the render view that a custom context action has been selected. | 
|  442   void PerformCustomContextMenuAction(unsigned action); |  436   void PerformCustomContextMenuAction(unsigned action); | 
|  443  |  437  | 
|  444  protected: |  438  protected: | 
|  445   // RenderWidgetHost protected overrides. |  439   // RenderWidgetHost protected overrides. | 
|  446   virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |  440   virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 
|  447                                       bool* is_keyboard_shortcut); |  441                                       bool* is_keyboard_shortcut); | 
|  448   virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); |  442   virtual void UnhandledKeyboardEvent(const NativeWebKeyboardEvent& event); | 
|  449   virtual void OnUserGesture(); |  443   virtual void OnUserGesture(); | 
|  450   virtual void NotifyRendererUnresponsive(); |  444   virtual void NotifyRendererUnresponsive(); | 
|  451   virtual void NotifyRendererResponsive(); |  445   virtual void NotifyRendererResponsive(); | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  488                                             const GURL& url); |  482                                             const GURL& url); | 
|  489   void OnMsgDidFailProvisionalLoadWithError(bool main_frame, |  483   void OnMsgDidFailProvisionalLoadWithError(bool main_frame, | 
|  490                                             int error_code, |  484                                             int error_code, | 
|  491                                             const GURL& url, |  485                                             const GURL& url, | 
|  492                                             bool showing_repost_interstitial); |  486                                             bool showing_repost_interstitial); | 
|  493   void OnMsgFindReply(int request_id, |  487   void OnMsgFindReply(int request_id, | 
|  494                       int number_of_matches, |  488                       int number_of_matches, | 
|  495                       const gfx::Rect& selection_rect, |  489                       const gfx::Rect& selection_rect, | 
|  496                       int active_match_ordinal, |  490                       int active_match_ordinal, | 
|  497                       bool final_update); |  491                       bool final_update); | 
|  498   void OnDeterminePageTextReply(const std::wstring& tab_text); |  | 
|  499   void OnExecuteCodeFinished(int request_id, bool success); |  492   void OnExecuteCodeFinished(int request_id, bool success); | 
|  500   void OnMsgUpdateFavIconURL(int32 page_id, const GURL& icon_url); |  493   void OnMsgUpdateFavIconURL(int32 page_id, const GURL& icon_url); | 
|  501   void OnMsgDidDownloadFavIcon(int id, |  494   void OnMsgDidDownloadFavIcon(int id, | 
|  502                                const GURL& image_url, |  495                                const GURL& image_url, | 
|  503                                bool errored, |  496                                bool errored, | 
|  504                                const SkBitmap& image_data); |  497                                const SkBitmap& image_data); | 
|  505   void OnMsgContextMenu(const ContextMenuParams& params); |  498   void OnMsgContextMenu(const ContextMenuParams& params); | 
|  506   void OnMsgOpenURL(const GURL& url, const GURL& referrer, |  499   void OnMsgOpenURL(const GURL& url, const GURL& referrer, | 
|  507                     WindowOpenDisposition disposition); |  500                     WindowOpenDisposition disposition); | 
|  508   void OnMsgDidContentsPreferredSizeChange(const gfx::Size& new_size); |  501   void OnMsgDidContentsPreferredSizeChange(const gfx::Size& new_size); | 
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  586                                      const string16& text, |  579                                      const string16& text, | 
|  587                                      int notification_id); |  580                                      int notification_id); | 
|  588   void OnCancelDesktopNotification(int notification_id); |  581   void OnCancelDesktopNotification(int notification_id); | 
|  589   void OnRequestNotificationPermission(const GURL& origin, int callback_id); |  582   void OnRequestNotificationPermission(const GURL& origin, int callback_id); | 
|  590  |  583  | 
|  591   void OnExtensionRequest(const std::string& name, const ListValue& args, |  584   void OnExtensionRequest(const std::string& name, const ListValue& args, | 
|  592                           int request_id, bool has_callback); |  585                           int request_id, bool has_callback); | 
|  593   void OnExtensionPostMessage(int port_id, const std::string& message); |  586   void OnExtensionPostMessage(int port_id, const std::string& message); | 
|  594   void OnAccessibilityFocusChange(int acc_obj_id); |  587   void OnAccessibilityFocusChange(int acc_obj_id); | 
|  595   void OnCSSInserted(); |  588   void OnCSSInserted(); | 
 |  589   void OnPageContents(const GURL& url, | 
 |  590                       int32 page_id, | 
 |  591                       const std::wstring& contents); | 
|  596  |  592  | 
|  597  private: |  593  private: | 
|  598   friend class TestRenderViewHost; |  594   friend class TestRenderViewHost; | 
|  599  |  595  | 
|  600   void UpdateBackForwardListCount(); |  596   void UpdateBackForwardListCount(); | 
|  601  |  597  | 
|  602   // NotificationObserver implementation. |  598   // NotificationObserver implementation. | 
|  603   void Observe(NotificationType type, |  599   void Observe(NotificationType type, | 
|  604                const NotificationSource& source, |  600                const NotificationSource& source, | 
|  605                const NotificationDetails& details); |  601                const NotificationDetails& details); | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  664  |  660  | 
|  665   // True if the render view can be shut down suddenly. |  661   // True if the render view can be shut down suddenly. | 
|  666   bool sudden_termination_allowed_; |  662   bool sudden_termination_allowed_; | 
|  667  |  663  | 
|  668   NotificationRegistrar registrar_; |  664   NotificationRegistrar registrar_; | 
|  669  |  665  | 
|  670   DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |  666   DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 
|  671 }; |  667 }; | 
|  672  |  668  | 
|  673 #endif  // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |  669 #endif  // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 
| OLD | NEW |