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

Side by Side Diff: webkit/glue/webframe_impl.cc

Issue 6274: Greasemonkey support. (Closed)
Patch Set: Created 12 years, 2 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
« chrome/renderer/render_view.cc ('K') | « webkit/glue/webframe_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 3 * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // We must call init() after frame_ is assigned because it is referenced 313 // We must call init() after frame_ is assigned because it is referenced
314 // during init(). 314 // during init().
315 frame_->init(); 315 frame_->init();
316 } 316 }
317 317
318 void WebFrameImpl::LoadRequest(WebRequest* request) { 318 void WebFrameImpl::LoadRequest(WebRequest* request) {
319 SubstituteData data; 319 SubstituteData data;
320 InternalLoadRequest(request, data, false); 320 InternalLoadRequest(request, data, false);
321 } 321 }
322 322
323 void WebFrameImpl::ExecuteJavaScript(const std::wstring& code,
324 const std::wstring& url) {
325 frame_->loader()->executeScript(webkit_glue::StdWStringToString(url),
326 1 /* base line number (for errors) */,
327 webkit_glue::StdWStringToString(code));
328 }
329
323 void WebFrameImpl::InternalLoadRequest(const WebRequest* request, 330 void WebFrameImpl::InternalLoadRequest(const WebRequest* request,
324 const SubstituteData& data, 331 const SubstituteData& data,
325 bool replace) { 332 bool replace) {
326 const WebRequestImpl* request_impl = 333 const WebRequestImpl* request_impl =
327 static_cast<const WebRequestImpl*>(request); 334 static_cast<const WebRequestImpl*>(request);
328 335
329 const ResourceRequest& resource_request = 336 const ResourceRequest& resource_request =
330 request_impl->frame_load_request().resourceRequest(); 337 request_impl->frame_load_request().resourceRequest();
331 338
332 // Special-case javascript URLs. Do not interrupt the existing load when 339 // Special-case javascript URLs. Do not interrupt the existing load when
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 if (loader) { 1870 if (loader) {
1864 return WebCore::FrameLoadTypeReloadAllowingStaleData == 1871 return WebCore::FrameLoadTypeReloadAllowingStaleData ==
1865 loader->policyLoadType(); 1872 loader->policyLoadType();
1866 } 1873 }
1867 return false; 1874 return false;
1868 } 1875 }
1869 1876
1870 int WebFrameImpl::PendingFrameUnloadEventCount() const { 1877 int WebFrameImpl::PendingFrameUnloadEventCount() const {
1871 return frame()->eventHandler()->pendingFrameUnloadEventCount(); 1878 return frame()->eventHandler()->pendingFrameUnloadEventCount();
1872 } 1879 }
OLDNEW
« chrome/renderer/render_view.cc ('K') | « webkit/glue/webframe_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698