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

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

Issue 6621025: Move socket stream messages to content, in preparation for moving its dispatc... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 #include "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #include "chrome/renderer/translate_helper.h" 97 #include "chrome/renderer/translate_helper.h"
98 #include "chrome/renderer/user_script_idle_scheduler.h" 98 #include "chrome/renderer/user_script_idle_scheduler.h"
99 #include "chrome/renderer/user_script_slave.h" 99 #include "chrome/renderer/user_script_slave.h"
100 #include "chrome/renderer/visitedlink_slave.h" 100 #include "chrome/renderer/visitedlink_slave.h"
101 #include "chrome/renderer/web_ui_bindings.h" 101 #include "chrome/renderer/web_ui_bindings.h"
102 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" 102 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h"
103 #include "chrome/renderer/webplugin_delegate_pepper.h" 103 #include "chrome/renderer/webplugin_delegate_pepper.h"
104 #include "chrome/renderer/webplugin_delegate_proxy.h" 104 #include "chrome/renderer/webplugin_delegate_proxy.h"
105 #include "chrome/renderer/websharedworker_proxy.h" 105 #include "chrome/renderer/websharedworker_proxy.h"
106 #include "chrome/renderer/webworker_proxy.h" 106 #include "chrome/renderer/webworker_proxy.h"
107 #include "content/common/content_constants.h"
107 #include "grit/generated_resources.h" 108 #include "grit/generated_resources.h"
108 #include "grit/renderer_resources.h" 109 #include "grit/renderer_resources.h"
109 #include "media/base/filter_collection.h" 110 #include "media/base/filter_collection.h"
110 #include "media/base/media_switches.h" 111 #include "media/base/media_switches.h"
111 #include "media/base/message_loop_factory_impl.h" 112 #include "media/base/message_loop_factory_impl.h"
112 #include "net/base/data_url.h" 113 #include "net/base/data_url.h"
113 #include "net/base/escape.h" 114 #include "net/base/escape.h"
114 #include "net/base/net_errors.h" 115 #include "net/base/net_errors.h"
115 #include "net/http/http_util.h" 116 #include "net/http/http_util.h"
116 #include "ppapi/c/private/ppb_flash_net_connector.h" 117 #include "ppapi/c/private/ppb_flash_net_connector.h"
(...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 int misspelled_offset, misspelled_length; 2444 int misspelled_offset, misspelled_length;
2444 bool spelled_right = RenderThread::current()->spellchecker()-> 2445 bool spelled_right = RenderThread::current()->spellchecker()->
2445 SpellCheckWord( 2446 SpellCheckWord(
2446 params.misspelled_word.c_str(), params.misspelled_word.size(), 2447 params.misspelled_word.c_str(), params.misspelled_word.size(),
2447 document_tag_, 2448 document_tag_,
2448 &misspelled_offset, &misspelled_length, 2449 &misspelled_offset, &misspelled_length,
2449 &params.dictionary_suggestions); 2450 &params.dictionary_suggestions);
2450 if (spelled_right) 2451 if (spelled_right)
2451 params.misspelled_word.clear(); 2452 params.misspelled_word.clear();
2452 } 2453 }
2453 // Serializing a GURL longer than chrome::kMaxURLChars will fail, so don't do 2454 // Serializing a GURL longer than content::kMaxURLChars will fail, so don't do
2454 // it. We replace it with an empty GURL so the appropriate items are disabled 2455 // it. We replace it with an empty GURL so the appropriate items are disabled
2455 // in the context menu. 2456 // in the context menu.
2456 // TODO(jcivelli): http://crbug.com/45160 This prevents us from saving large 2457 // TODO(jcivelli): http://crbug.com/45160 This prevents us from saving large
2457 // data encoded images. We should have a way to save them. 2458 // data encoded images. We should have a way to save them.
2458 if (params.src_url.spec().size() > chrome::kMaxURLChars) 2459 if (params.src_url.spec().size() > content::kMaxURLChars)
2459 params.src_url = GURL(); 2460 params.src_url = GURL();
2460 context_menu_node_ = data.node; 2461 context_menu_node_ = data.node;
2461 Send(new ViewHostMsg_ContextMenu(routing_id_, params)); 2462 Send(new ViewHostMsg_ContextMenu(routing_id_, params));
2462 } 2463 }
2463 2464
2464 bool RenderView::supportsFullscreen() { 2465 bool RenderView::supportsFullscreen() {
2465 return CommandLine::ForCurrentProcess()->HasSwitch( 2466 return CommandLine::ForCurrentProcess()->HasSwitch(
2466 switches::kEnableVideoFullscreen); 2467 switches::kEnableVideoFullscreen);
2467 } 2468 }
2468 2469
(...skipping 3234 matching lines...) Expand 10 before | Expand all | Expand 10 after
5703 } 5704 }
5704 } 5705 }
5705 5706
5706 void RenderView::OnContextMenuClosed( 5707 void RenderView::OnContextMenuClosed(
5707 const webkit_glue::CustomContextMenuContext& custom_context) { 5708 const webkit_glue::CustomContextMenuContext& custom_context) {
5708 if (custom_context.is_pepper_menu) 5709 if (custom_context.is_pepper_menu)
5709 pepper_delegate_.OnContextMenuClosed(custom_context); 5710 pepper_delegate_.OnContextMenuClosed(custom_context);
5710 else 5711 else
5711 context_menu_node_.reset(); 5712 context_menu_node_.reset();
5712 } 5713 }
OLDNEW
« no previous file with comments | « chrome/common/utility_messages.h ('k') | content/browser/renderer_host/socket_stream_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698