Chromium Code Reviews| OLD | NEW |
|---|---|
| 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> |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 931 void OnSetDOMUIProperty(const std::string& name, const std::string& value); | 931 void OnSetDOMUIProperty(const std::string& name, const std::string& value); |
| 932 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); | 932 void OnSetEditCommandsForNextKeyEvent(const EditCommands& edit_commands); |
| 933 void OnSetInitialFocus(bool reverse); | 933 void OnSetInitialFocus(bool reverse); |
| 934 void OnScrollFocusedEditableNodeIntoView(); | 934 void OnScrollFocusedEditableNodeIntoView(); |
| 935 void OnSetPageEncoding(const std::string& encoding_name); | 935 void OnSetPageEncoding(const std::string& encoding_name); |
| 936 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); | 936 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); |
| 937 void OnSetupDevToolsClient(); | 937 void OnSetupDevToolsClient(); |
| 938 #if defined(OS_MACOSX) | 938 #if defined(OS_MACOSX) |
| 939 void OnSetWindowVisibility(bool visible); | 939 void OnSetWindowVisibility(bool visible); |
| 940 #endif | 940 #endif |
| 941 void OnSetZoomLevel(double zoom_level); | 941 void OnSetZoomLevel(int request_id, double zoom_level); |
| 942 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); | 942 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); |
| 943 void OnShouldClose(); | 943 void OnShouldClose(); |
| 944 void OnStop(); | 944 void OnStop(); |
| 945 void OnStopFinding(const ViewMsg_StopFinding_Params& params); | 945 void OnStopFinding(const ViewMsg_StopFinding_Params& params); |
| 946 void OnThemeChanged(); | 946 void OnThemeChanged(); |
| 947 void OnToggleSpellCheck(); | 947 void OnToggleSpellCheck(); |
| 948 void OnToggleSpellPanel(bool is_currently_visible); | 948 void OnToggleSpellPanel(bool is_currently_visible); |
| 949 void OnUndo(); | 949 void OnUndo(); |
| 950 void OnUpdateBrowserWindowId(int window_id); | 950 void OnUpdateBrowserWindowId(int window_id); |
| 951 void OnUpdateTargetURLAck(); | 951 void OnUpdateTargetURLAck(); |
| 952 void OnUpdateWebPreferences(const WebPreferences& prefs); | 952 void OnUpdateWebPreferences(const WebPreferences& prefs); |
| 953 #if defined(OS_MACOSX) | 953 #if defined(OS_MACOSX) |
| 954 void OnWindowFrameChanged(const gfx::Rect& window_frame, | 954 void OnWindowFrameChanged(const gfx::Rect& window_frame, |
| 955 const gfx::Rect& view_frame); | 955 const gfx::Rect& view_frame); |
| 956 void OnSelectPopupMenuItem(int selected_index); | 956 void OnSelectPopupMenuItem(int selected_index); |
| 957 #endif | 957 #endif |
| 958 void OnZoom(PageZoom::Function function); | 958 void OnZoom(PageZoom::Function function); |
| 959 void OnJavaScriptStressTestControl(int cmd, int param); | 959 void OnJavaScriptStressTestControl(int cmd, int param); |
| 960 | 960 |
| 961 // Adding a new message handler? Please add it in alphabetical order above | 961 // Adding a new message handler? Please add it in alphabetical order above |
| 962 // and put it in the same position in the .cc file. | 962 // and put it in the same position in the .cc file. |
| 963 | 963 |
| 964 // Misc private functions ---------------------------------------------------- | 964 // Misc private functions ---------------------------------------------------- |
| 965 | 965 |
| 966 // Helper to add an error message to the root frame's console. | |
| 967 void AddErrorToRootConsole(const string16& message); | |
| 968 | |
| 966 // Helper method that returns if the user wants to block content of type | 969 // Helper method that returns if the user wants to block content of type |
| 967 // |content_type|. | 970 // |content_type|. |
| 968 bool AllowContentType(ContentSettingsType settings_type); | 971 bool AllowContentType(ContentSettingsType settings_type); |
| 969 | 972 |
| 970 void AltErrorPageFinished(WebKit::WebFrame* frame, | 973 void AltErrorPageFinished(WebKit::WebFrame* frame, |
| 971 const WebKit::WebURLError& original_error, | 974 const WebKit::WebURLError& original_error, |
| 972 const std::string& html); | 975 const std::string& html); |
| 973 | 976 |
| 974 // Exposes the DOMAutomationController object that allows JS to send | 977 // Exposes the DOMAutomationController object that allows JS to send |
| 975 // information to the browser process. | 978 // information to the browser process. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1095 | 1098 |
| 1096 // Common method for OnPrintPages() and OnPrintPreview(). | 1099 // Common method for OnPrintPages() and OnPrintPreview(). |
| 1097 void OnPrint(bool is_preview); | 1100 void OnPrint(bool is_preview); |
| 1098 | 1101 |
| 1099 // Prints |frame|. | 1102 // Prints |frame|. |
| 1100 void Print(WebKit::WebFrame* frame, bool script_initiated, bool is_preview); | 1103 void Print(WebKit::WebFrame* frame, bool script_initiated, bool is_preview); |
| 1101 | 1104 |
| 1102 // Returns the PrintWebViewHelper for this class, creating if necessary. | 1105 // Returns the PrintWebViewHelper for this class, creating if necessary. |
| 1103 PrintWebViewHelper* GetPrintWebViewHelper(); | 1106 PrintWebViewHelper* GetPrintWebViewHelper(); |
| 1104 | 1107 |
| 1108 // Notify the browser of a change to the zoom level. | |
| 1109 void ReportZoomLevelChanged(int request_id); | |
|
Aaron Boodman
2011/02/07 09:26:55
The methods in this class that start with an initi
| |
| 1110 | |
| 1105 // Starts nav_state_sync_timer_ if it isn't already running. | 1111 // Starts nav_state_sync_timer_ if it isn't already running. |
| 1106 void StartNavStateSyncTimerIfNecessary(); | 1112 void StartNavStateSyncTimerIfNecessary(); |
| 1107 | 1113 |
| 1108 // Dispatches the current navigation state to the browser. Called on a | 1114 // Dispatches the current navigation state to the browser. Called on a |
| 1109 // periodic timer so we don't send too many messages. | 1115 // periodic timer so we don't send too many messages. |
| 1110 void SyncNavigationState(); | 1116 void SyncNavigationState(); |
| 1111 | 1117 |
| 1112 #if defined(OS_LINUX) | 1118 #if defined(OS_LINUX) |
| 1113 void UpdateFontRenderingFromRendererPrefs(); | 1119 void UpdateFontRenderingFromRendererPrefs(); |
| 1114 #else | 1120 #else |
| 1115 void UpdateFontRenderingFromRendererPrefs() {} | 1121 void UpdateFontRenderingFromRendererPrefs() {} |
| 1116 #endif | 1122 #endif |
| 1117 | 1123 |
| 1118 // Update the target url and tell the browser that the target URL has changed. | 1124 // Update the target url and tell the browser that the target URL has changed. |
| 1119 // If |url| is empty, show |fallback_url|. | 1125 // If |url| is empty, show |fallback_url|. |
| 1120 void UpdateTargetURL(const GURL& url, const GURL& fallback_url); | 1126 void UpdateTargetURL(const GURL& url, const GURL& fallback_url); |
| 1121 | 1127 |
| 1122 // Updates the state of the toggle spell check command in the browser process. | 1128 // Updates the state of the toggle spell check command in the browser process. |
| 1123 void UpdateToggleSpellCheckCommandState(); | 1129 void UpdateToggleSpellCheckCommandState(); |
| 1124 | 1130 |
| 1125 // Helper to add an error message to the root frame's console. | |
| 1126 void AddErrorToRootConsole(const string16& message); | |
| 1127 | |
| 1128 // --------------------------------------------------------------------------- | 1131 // --------------------------------------------------------------------------- |
| 1129 // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put | 1132 // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put |
| 1130 // it in the same order in the .cc file as it was in the header. | 1133 // it in the same order in the .cc file as it was in the header. |
| 1131 // --------------------------------------------------------------------------- | 1134 // --------------------------------------------------------------------------- |
| 1132 | 1135 |
| 1133 // Settings ------------------------------------------------------------------ | 1136 // Settings ------------------------------------------------------------------ |
| 1134 | 1137 |
| 1135 WebPreferences webkit_preferences_; | 1138 WebPreferences webkit_preferences_; |
| 1136 RendererPreferences renderer_preferences_; | 1139 RendererPreferences renderer_preferences_; |
| 1137 | 1140 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1476 // bunch of stuff, you should probably create a helper class and put your | 1479 // bunch of stuff, you should probably create a helper class and put your |
| 1477 // data and methods on that to avoid bloating RenderView more. You can use | 1480 // data and methods on that to avoid bloating RenderView more. You can use |
| 1478 // the Observer interface to filter IPC messages and receive frame change | 1481 // the Observer interface to filter IPC messages and receive frame change |
| 1479 // notifications. | 1482 // notifications. |
| 1480 // --------------------------------------------------------------------------- | 1483 // --------------------------------------------------------------------------- |
| 1481 | 1484 |
| 1482 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1485 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 1483 }; | 1486 }; |
| 1484 | 1487 |
| 1485 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1488 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |