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

Unified Diff: chrome/renderer/render_view.cc

Issue 246079: More WebView / WebViewDelegate cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebFrameClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 27906)
+++ chrome/renderer/render_view.cc (working copy)
@@ -219,6 +219,7 @@
decrement_shared_popup_at_destruction_(false),
form_field_autofill_request_id_(0),
popup_notification_visible_(false),
+ spelling_panel_visible_(false),
delay_seconds_for_form_state_sync_(kDefaultDelaySecondsForFormStateSync),
preferred_width_(0),
send_preferred_width_changes_(false),
@@ -887,7 +888,7 @@
return;
// We need to tell the webView whether the spelling panel is visible or not so
// that it won't need to make ipc calls later.
- webview()->SetSpellingPanelVisibility(is_currently_visible);
+ spelling_panel_visible_ = is_currently_visible;
webview()->focusedFrame()->executeCommand(
WebString::fromUTF8("ToggleSpellPanel"));
}
@@ -1548,6 +1549,10 @@
Send(new ViewHostMsg_ShowSpellingPanel(routing_id_, show));
}
+bool RenderView::isShowingSpellingUI() {
+ return spelling_panel_visible_;
+}
+
void RenderView::updateSpellingUIWithMisspelledWord(const WebString& word) {
Send(new ViewHostMsg_UpdateSpellingPanelWithMisspelledWord(
routing_id_, UTF16ToWideHack(word)));
@@ -1676,6 +1681,11 @@
history_forward_list_count_ = 0;
}
+void RenderView::didUpdateInspectorSettings() {
+ Send(new ViewHostMsg_UpdateInspectorSettings(
+ routing_id_, webview()->inspectorSettings().utf8()));
+}
+
// WebKit::WebWidgetClient ----------------------------------------------------
// We are supposed to get a single call to Show for a newly created RenderView
@@ -2320,6 +2330,44 @@
}
}
+void RenderView::reportFindInPageMatchCount(int request_id, int count,
+ bool final_update) {
+ // If we have a message that has been queued up, then we should just replace
+ // it. The ACK from the browser will make sure it gets sent when the browser
+ // wants it.
+ if (queued_find_reply_message_.get()) {
+ IPC::Message* msg = new ViewHostMsg_Find_Reply(
+ routing_id_,
+ request_id,
+ count,
+ gfx::Rect(),
+ -1, // Don't update active match ordinal.
+ final_update);
+ queued_find_reply_message_.reset(msg);
+ } else {
+ // Send the search result over to the browser process.
+ Send(new ViewHostMsg_Find_Reply(
+ routing_id_,
+ request_id,
+ count,
+ gfx::Rect(),
+ -1, // // Don't update active match ordinal.
+ final_update));
+ }
+}
+
+void RenderView::reportFindInPageSelection(int request_id,
+ int active_match_ordinal,
+ const WebRect& selection_rect) {
+ // Send the search result over to the browser process.
+ Send(new ViewHostMsg_Find_Reply(routing_id_,
+ request_id,
+ -1,
+ selection_rect,
+ active_match_ordinal,
+ false));
+}
+
// webkit_glue::WebPluginPageDelegate -----------------------------------------
webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate(
@@ -2701,44 +2749,6 @@
determine_page_text_after_loading_stops_ = true;
}
-void RenderView::ReportFindInPageMatchCount(int count, int request_id,
- bool final_update) {
- // If we have a message that has been queued up, then we should just replace
- // it. The ACK from the browser will make sure it gets sent when the browser
- // wants it.
- if (queued_find_reply_message_.get()) {
- IPC::Message* msg = new ViewHostMsg_Find_Reply(
- routing_id_,
- request_id,
- count,
- gfx::Rect(),
- -1, // Don't update active match ordinal.
- final_update);
- queued_find_reply_message_.reset(msg);
- } else {
- // Send the search result over to the browser process.
- Send(new ViewHostMsg_Find_Reply(
- routing_id_,
- request_id,
- count,
- gfx::Rect(),
- -1, // // Don't update active match ordinal.
- final_update));
- }
-}
-
-void RenderView::ReportFindInPageSelection(int request_id,
- int active_match_ordinal,
- const WebRect& selection_rect) {
- // Send the search result over to the browser process.
- Send(new ViewHostMsg_Find_Reply(routing_id_,
- request_id,
- -1,
- selection_rect,
- active_match_ordinal,
- false));
-}
-
bool RenderView::WasOpenedByUserGesture() const {
return opened_by_user_gesture_;
}
@@ -2773,10 +2783,6 @@
webview()->setPageEncoding(no_encoding);
}
-void RenderView::UpdateInspectorSettings(const std::wstring& raw_settings) {
- Send(new ViewHostMsg_UpdateInspectorSettings(routing_id_, raw_settings));
-}
-
WebDevToolsAgentDelegate* RenderView::GetWebDevToolsAgentDelegate() {
return devtools_agent_.get();
}
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698