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

Side by Side Diff: content/browser/renderer_host/render_view_host.cc

Issue 6883020: Make icon_messages use the IPC macros for defining the structs and the serialization code, and mo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 "content/browser/renderer_host/render_view_host.h" 5 #include "content/browser/renderer_host/render_view_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/json/json_reader.h" 13 #include "base/json/json_reader.h"
14 #include "base/string_util.h" 14 #include "base/string_util.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "chrome/browser/dom_operation_notification_details.h" 18 #include "chrome/browser/dom_operation_notification_details.h"
19 #include "chrome/browser/metrics/user_metrics.h" 19 #include "chrome/browser/metrics/user_metrics.h"
20 #include "chrome/browser/net/predictor_api.h" 20 #include "chrome/browser/net/predictor_api.h"
21 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/common/chrome_constants.h" 22 #include "chrome/common/chrome_constants.h"
23 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
24 #include "chrome/common/extensions/extension_messages.h" 24 #include "chrome/common/extensions/extension_messages.h"
25 #include "chrome/common/icon_messages.h"
25 #include "chrome/common/render_messages.h" 26 #include "chrome/common/render_messages.h"
26 #include "chrome/common/safe_browsing/safebrowsing_messages.h" 27 #include "chrome/common/safe_browsing/safebrowsing_messages.h"
27 #include "chrome/common/spellcheck_messages.h" 28 #include "chrome/common/spellcheck_messages.h"
28 #include "chrome/common/translate_errors.h" 29 #include "chrome/common/translate_errors.h"
29 #include "chrome/common/url_constants.h" 30 #include "chrome/common/url_constants.h"
30 #include "content/browser/child_process_security_policy.h" 31 #include "content/browser/child_process_security_policy.h"
31 #include "content/browser/content_browser_client.h" 32 #include "content/browser/content_browser_client.h"
32 #include "content/browser/cross_site_request_manager.h" 33 #include "content/browser/cross_site_request_manager.h"
33 #include "content/browser/in_process_webkit/session_storage_namespace.h" 34 #include "content/browser/in_process_webkit/session_storage_namespace.h"
34 #include "content/browser/renderer_host/render_process_host.h" 35 #include "content/browser/renderer_host/render_process_host.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 Send(new SpellCheckMsg_ToggleSpellPanel(routing_id(), is_currently_visible)); 565 Send(new SpellCheckMsg_ToggleSpellPanel(routing_id(), is_currently_visible));
565 } 566 }
566 567
567 int RenderViewHost::DownloadFavicon(const GURL& url, int image_size) { 568 int RenderViewHost::DownloadFavicon(const GURL& url, int image_size) {
568 if (!url.is_valid()) { 569 if (!url.is_valid()) {
569 NOTREACHED(); 570 NOTREACHED();
570 return 0; 571 return 0;
571 } 572 }
572 static int next_id = 1; 573 static int next_id = 1;
573 int id = next_id++; 574 int id = next_id++;
574 Send(new ViewMsg_DownloadFavicon(routing_id(), id, url, image_size)); 575 Send(new IconMsg_DownloadFavicon(routing_id(), id, url, image_size));
575 return id; 576 return id;
576 } 577 }
577 578
578 void RenderViewHost::CaptureSnapshot() { 579 void RenderViewHost::CaptureSnapshot() {
579 Send(new ViewMsg_CaptureSnapshot(routing_id())); 580 Send(new ViewMsg_CaptureSnapshot(routing_id()));
580 } 581 }
581 582
582 void RenderViewHost::JavaScriptMessageBoxClosed(IPC::Message* reply_msg, 583 void RenderViewHost::JavaScriptMessageBoxClosed(IPC::Message* reply_msg,
583 bool success, 584 bool success,
584 const std::wstring& prompt) { 585 const std::wstring& prompt) {
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 LOG(DFATAL) << "Invalid checked state " << checked_state; 1620 LOG(DFATAL) << "Invalid checked state " << checked_state;
1620 return; 1621 return;
1621 } 1622 }
1622 1623
1623 CommandState state; 1624 CommandState state;
1624 state.is_enabled = is_enabled; 1625 state.is_enabled = is_enabled;
1625 state.checked_state = 1626 state.checked_state =
1626 static_cast<RenderViewCommandCheckedState>(checked_state); 1627 static_cast<RenderViewCommandCheckedState>(checked_state);
1627 command_states_[static_cast<RenderViewCommand>(command)] = state; 1628 command_states_[static_cast<RenderViewCommand>(command)] = state;
1628 } 1629 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_view_observer.cc ('k') | content/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698