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

Side by Side Diff: third_party/WebKit/Source/web/WebFrameSerializerImpl.cpp

Issue 2881693002: Move more classes to WebLocalFrameBase instead of WebLocalFrameImpl. (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // saved resource files. 76 // saved resource files.
77 77
78 #include "web/WebFrameSerializerImpl.h" 78 #include "web/WebFrameSerializerImpl.h"
79 79
80 #include "core/HTMLNames.h" 80 #include "core/HTMLNames.h"
81 #include "core/dom/Document.h" 81 #include "core/dom/Document.h"
82 #include "core/dom/DocumentType.h" 82 #include "core/dom/DocumentType.h"
83 #include "core/dom/Element.h" 83 #include "core/dom/Element.h"
84 #include "core/editing/serializers/Serialization.h" 84 #include "core/editing/serializers/Serialization.h"
85 #include "core/frame/FrameSerializer.h" 85 #include "core/frame/FrameSerializer.h"
86 #include "core/frame/WebLocalFrameBase.h"
86 #include "core/html/HTMLAllCollection.h" 87 #include "core/html/HTMLAllCollection.h"
87 #include "core/html/HTMLElement.h" 88 #include "core/html/HTMLElement.h"
88 #include "core/html/HTMLFormElement.h" 89 #include "core/html/HTMLFormElement.h"
89 #include "core/html/HTMLFrameElementBase.h" 90 #include "core/html/HTMLFrameElementBase.h"
90 #include "core/html/HTMLFrameOwnerElement.h" 91 #include "core/html/HTMLFrameOwnerElement.h"
91 #include "core/html/HTMLHtmlElement.h" 92 #include "core/html/HTMLHtmlElement.h"
92 #include "core/html/HTMLMetaElement.h" 93 #include "core/html/HTMLMetaElement.h"
93 #include "core/loader/DocumentLoader.h" 94 #include "core/loader/DocumentLoader.h"
94 #include "core/loader/FrameLoader.h" 95 #include "core/loader/FrameLoader.h"
95 #include "platform/wtf/text/TextEncoding.h" 96 #include "platform/wtf/text/TextEncoding.h"
96 #include "public/platform/WebCString.h" 97 #include "public/platform/WebCString.h"
97 #include "public/platform/WebVector.h" 98 #include "public/platform/WebVector.h"
98 #include "web/WebLocalFrameImpl.h"
99 99
100 namespace blink { 100 namespace blink {
101 101
102 // Maximum length of data buffer which is used to temporary save generated 102 // Maximum length of data buffer which is used to temporary save generated
103 // html content data. This is a soft limit which might be passed if a very large 103 // html content data. This is a soft limit which might be passed if a very large
104 // contegious string is found in the html document. 104 // contegious string is found in the html document.
105 static const unsigned kDataBufferCapacity = 65536; 105 static const unsigned kDataBufferCapacity = 65536;
106 106
107 WebFrameSerializerImpl::SerializeDomParam::SerializeDomParam( 107 WebFrameSerializerImpl::SerializeDomParam::SerializeDomParam(
108 const KURL& url, 108 const KURL& url,
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 WebFrameSerializerImpl::WebFrameSerializerImpl( 438 WebFrameSerializerImpl::WebFrameSerializerImpl(
439 WebLocalFrame* frame, 439 WebLocalFrame* frame,
440 WebFrameSerializerClient* client, 440 WebFrameSerializerClient* client,
441 WebFrameSerializer::LinkRewritingDelegate* delegate) 441 WebFrameSerializer::LinkRewritingDelegate* delegate)
442 : client_(client), 442 : client_(client),
443 delegate_(delegate), 443 delegate_(delegate),
444 html_entities_(false), 444 html_entities_(false),
445 xml_entities_(true) { 445 xml_entities_(true) {
446 // Must specify available webframe. 446 // Must specify available webframe.
447 DCHECK(frame); 447 DCHECK(frame);
448 specified_web_local_frame_impl_ = ToWebLocalFrameImpl(frame); 448 specified_web_local_frame_impl_ = ToWebLocalFrameBase(frame);
449 // Make sure we have non null client and delegate. 449 // Make sure we have non null client and delegate.
450 DCHECK(client); 450 DCHECK(client);
451 DCHECK(delegate); 451 DCHECK(delegate);
452 452
453 DCHECK(data_buffer_.IsEmpty()); 453 DCHECK(data_buffer_.IsEmpty());
454 } 454 }
455 455
456 bool WebFrameSerializerImpl::Serialize() { 456 bool WebFrameSerializerImpl::Serialize() {
457 bool did_serialization = false; 457 bool did_serialization = false;
458 458
(...skipping 23 matching lines...) Expand all
482 // Report empty contents for invalid URLs. 482 // Report empty contents for invalid URLs.
483 client_->DidSerializeDataForFrame( 483 client_->DidSerializeDataForFrame(
484 WebCString(), WebFrameSerializerClient::kCurrentFrameIsFinished); 484 WebCString(), WebFrameSerializerClient::kCurrentFrameIsFinished);
485 } 485 }
486 486
487 DCHECK(data_buffer_.IsEmpty()); 487 DCHECK(data_buffer_.IsEmpty());
488 return did_serialization; 488 return did_serialization;
489 } 489 }
490 490
491 } // namespace blink 491 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebFrameSerializerImpl.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698