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

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

Issue 192017: Convert std::wstring encoding names to std::string in a bunch of files. (Closed)
Patch Set: mac and linux fixes 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 unified diff | Download patch
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 7
8 #include <set>
8 #include <string> 9 #include <string>
9 #include <queue> 10 #include <queue>
10 #include <vector> 11 #include <vector>
11 12
12 #include "base/basictypes.h" 13 #include "base/basictypes.h"
13 #include "base/file_path.h" 14 #include "base/file_path.h"
14 #include "base/gfx/point.h" 15 #include "base/gfx/point.h"
15 #include "base/gfx/rect.h" 16 #include "base/gfx/rect.h"
16 #include "base/id_map.h" 17 #include "base/id_map.h"
17 #include "base/shared_memory.h" 18 #include "base/shared_memory.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 virtual void DidCommitLoadForFrame(WebView* webview, WebKit::WebFrame* frame, 211 virtual void DidCommitLoadForFrame(WebView* webview, WebKit::WebFrame* frame,
211 bool is_new_navigation); 212 bool is_new_navigation);
212 virtual void DidReceiveTitle(WebView* webview, 213 virtual void DidReceiveTitle(WebView* webview,
213 const std::wstring& title, 214 const std::wstring& title,
214 WebKit::WebFrame* frame); 215 WebKit::WebFrame* frame);
215 virtual void DidFinishLoadForFrame(WebView* webview, 216 virtual void DidFinishLoadForFrame(WebView* webview,
216 WebKit::WebFrame* frame); 217 WebKit::WebFrame* frame);
217 virtual void DidFailLoadWithError(WebView* webview, 218 virtual void DidFailLoadWithError(WebView* webview,
218 const WebKit::WebURLError& error, 219 const WebKit::WebURLError& error,
219 WebKit::WebFrame* forFrame); 220 WebKit::WebFrame* forFrame);
220 virtual void DidFinishDocumentLoadForFrame( 221 virtual void DidFinishDocumentLoadForFrame(WebView* webview,
221 WebView* webview, 222 WebKit::WebFrame* frame);
222 WebKit::WebFrame* frame);
223 virtual bool DidLoadResourceFromMemoryCache( 223 virtual bool DidLoadResourceFromMemoryCache(
224 WebView* webview, 224 WebView* webview,
225 const WebKit::WebURLRequest& request, 225 const WebKit::WebURLRequest& request,
226 const WebKit::WebURLResponse& response, 226 const WebKit::WebURLResponse& response,
227 WebKit::WebFrame* frame); 227 WebKit::WebFrame* frame);
228 virtual void DidHandleOnloadEventsForFrame( 228 virtual void DidHandleOnloadEventsForFrame(WebView* webview,
229 WebView* webview, 229 WebKit::WebFrame* frame);
230 WebKit::WebFrame* frame);
231 virtual void DidChangeLocationWithinPageForFrame(WebView* webview, 230 virtual void DidChangeLocationWithinPageForFrame(WebView* webview,
232 WebKit::WebFrame* frame, 231 WebKit::WebFrame* frame,
233 bool is_new_navigation); 232 bool is_new_navigation);
234 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget, 233 virtual void DidContentsSizeChange(WebKit::WebWidget* webwidget,
235 int new_width, 234 int new_width,
236 int new_height); 235 int new_height);
237 virtual void DidCompleteClientRedirect(WebView* webview, 236 virtual void DidCompleteClientRedirect(WebView* webview,
238 WebKit::WebFrame* frame, 237 WebKit::WebFrame* frame,
239 const GURL& source); 238 const GURL& source);
240 virtual void WillCloseFrame(WebView* webview, WebKit::WebFrame* frame); 239 virtual void WillCloseFrame(WebView* webview, WebKit::WebFrame* frame);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // a) function:DidCommitLoadForFrame. When this function is called, 468 // a) function:DidCommitLoadForFrame. When this function is called,
470 // that means we have got first data. In here we try to get encoding 469 // that means we have got first data. In here we try to get encoding
471 // of page if it has been specified in http header. 470 // of page if it has been specified in http header.
472 // b) function:DidReceiveTitle. When this function is called, 471 // b) function:DidReceiveTitle. When this function is called,
473 // that means we have got specified title. Because in most of webpages, 472 // that means we have got specified title. Because in most of webpages,
474 // title tags will follow meta tags. In here we try to get encoding of 473 // title tags will follow meta tags. In here we try to get encoding of
475 // page if it has been specified in meta tag. 474 // page if it has been specified in meta tag.
476 // c) function:DidFinishDocumentLoadForFrame. When this function is 475 // c) function:DidFinishDocumentLoadForFrame. When this function is
477 // called, that means we have got whole html page. In here we should 476 // called, that means we have got whole html page. In here we should
478 // finally get right encoding of page. 477 // finally get right encoding of page.
479 void UpdateEncoding(WebKit::WebFrame* frame, const std::wstring& encoding_name ); 478 void UpdateEncoding(WebKit::WebFrame* frame,
479 const std::string& encoding_name);
480 480
481 // Captures the thumbnail and text contents for indexing for the given load 481 // Captures the thumbnail and text contents for indexing for the given load
482 // ID. If the view's load ID is different than the parameter, this call is 482 // ID. If the view's load ID is different than the parameter, this call is
483 // a NOP. Typically called on a timer, so the load ID may have changed in the 483 // a NOP. Typically called on a timer, so the load ID may have changed in the
484 // meantime. 484 // meantime.
485 void CapturePageInfo(int load_id, bool preliminary_capture); 485 void CapturePageInfo(int load_id, bool preliminary_capture);
486 486
487 // Called to retrieve the text from the given frame contents, the page text 487 // Called to retrieve the text from the given frame contents, the page text
488 // up to the maximum amount will be placed into the given buffer 488 // up to the maximum amount will be placed into the given buffer
489 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents); 489 void CaptureText(WebKit::WebFrame* frame, std::wstring* contents);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 void OnDelete(); 533 void OnDelete();
534 void OnSelectAll(); 534 void OnSelectAll();
535 void OnCopyImageAt(int x, int y); 535 void OnCopyImageAt(int x, int y);
536 void OnExecuteEditCommand(const std::string& name, const std::string& value); 536 void OnExecuteEditCommand(const std::string& name, const std::string& value);
537 void OnSetupDevToolsClient(); 537 void OnSetupDevToolsClient();
538 void OnCancelDownload(int32 download_id); 538 void OnCancelDownload(int32 download_id);
539 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&); 539 void OnFind(int request_id, const string16&, const WebKit::WebFindOptions&);
540 void OnDeterminePageText(); 540 void OnDeterminePageText();
541 void OnZoom(int function); 541 void OnZoom(int function);
542 void OnInsertText(const string16& text); 542 void OnInsertText(const string16& text);
543 void OnSetPageEncoding(const std::wstring& encoding_name); 543 void OnSetPageEncoding(const std::string& encoding_name);
544 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url); 544 void OnGetAllSavableResourceLinksForCurrentPage(const GURL& page_url);
545 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks( 545 void OnGetSerializedHtmlDataForCurrentPageWithLocalLinks(
546 const std::vector<GURL>& links, 546 const std::vector<GURL>& links,
547 const std::vector<FilePath>& local_paths, 547 const std::vector<FilePath>& local_paths,
548 const FilePath& local_directory_name); 548 const FilePath& local_directory_name);
549 void OnUploadFileRequest(const ViewMsg_UploadFile_Params& p); 549 void OnUploadFileRequest(const ViewMsg_UploadFile_Params& p);
550 void OnFormFill(const FormData& form); 550 void OnFormFill(const FormData& form);
551 void OnFillPasswordForm( 551 void OnFillPasswordForm(
552 const webkit_glue::PasswordFormDomManager::FillData& form_data); 552 const webkit_glue::PasswordFormDomManager::FillData& form_data);
553 void OnDragTargetDragEnter(const WebDropData& drop_data, 553 void OnDragTargetDragEnter(const WebDropData& drop_data,
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 // DOM Automation Controller CppBoundClass. 705 // DOM Automation Controller CppBoundClass.
706 DomAutomationController dom_automation_controller_; 706 DomAutomationController dom_automation_controller_;
707 707
708 // Chrome page<->browser messaging CppBoundClass. 708 // Chrome page<->browser messaging CppBoundClass.
709 DOMUIBindings dom_ui_bindings_; 709 DOMUIBindings dom_ui_bindings_;
710 710
711 // External host exposed through automation controller. 711 // External host exposed through automation controller.
712 ExternalHostBindings external_host_bindings_; 712 ExternalHostBindings external_host_bindings_;
713 713
714 // The last gotten main frame's encoding. 714 // The last gotten main frame's encoding.
715 std::wstring last_encoding_name_; 715 std::string last_encoding_name_;
716 716
717 // The URL we think the user's mouse is hovering over. We use this to 717 // The URL we think the user's mouse is hovering over. We use this to
718 // determine if we want to send a new one (we do not need to send 718 // determine if we want to send a new one (we do not need to send
719 // duplicates). 719 // duplicates).
720 GURL target_url_; 720 GURL target_url_;
721 721
722 // The state of our target_url transmissions. When we receive a request to 722 // The state of our target_url transmissions. When we receive a request to
723 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK 723 // send a URL to the browser, we set this to TARGET_INFLIGHT until an ACK
724 // comes back - if a new request comes in before the ACK, we store the new 724 // comes back - if a new request comes in before the ACK, we store the new
725 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an 725 // URL in pending_target_url_ and set the status to TARGET_PENDING. If an
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 // page id for the last navigation sent to the browser. 892 // page id for the last navigation sent to the browser.
893 int32 last_top_level_navigation_page_id_; 893 int32 last_top_level_navigation_page_id_;
894 894
895 // The settings this render view initialized WebKit with. 895 // The settings this render view initialized WebKit with.
896 WebPreferences webkit_preferences_; 896 WebPreferences webkit_preferences_;
897 897
898 DISALLOW_COPY_AND_ASSIGN(RenderView); 898 DISALLOW_COPY_AND_ASSIGN(RenderView);
899 }; 899 };
900 900
901 #endif // CHROME_RENDERER_RENDER_VIEW_H_ 901 #endif // CHROME_RENDERER_RENDER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698