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

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

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
« no previous file with comments | « webkit/glue/devtools/dom_agent_unittest.cc ('k') | webkit/glue/dom_operations_unittest.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "config.h" 5 #include "config.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 8
9 MSVC_PUSH_WARNING_LEVEL(0); 9 MSVC_PUSH_WARNING_LEVEL(0);
10 #include "AnimationController.h" 10 #include "AnimationController.h"
(...skipping 20 matching lines...) Expand all
31 #include "base/string_util.h" 31 #include "base/string_util.h"
32 #include "webkit/glue/dom_operations.h" 32 #include "webkit/glue/dom_operations.h"
33 #include "webkit/glue/dom_operations_private.h" 33 #include "webkit/glue/dom_operations_private.h"
34 #include "webkit/glue/form_data.h" 34 #include "webkit/glue/form_data.h"
35 #include "webkit/glue/glue_util.h" 35 #include "webkit/glue/glue_util.h"
36 #include "webkit/glue/password_autocomplete_listener.h" 36 #include "webkit/glue/password_autocomplete_listener.h"
37 #include "webkit/glue/webframe_impl.h" 37 #include "webkit/glue/webframe_impl.h"
38 #include "webkit/glue/webview_impl.h" 38 #include "webkit/glue/webview_impl.h"
39 39
40 using WebCore::String; 40 using WebCore::String;
41 using WebKit::WebFrame;
41 42
42 namespace { 43 namespace {
43 44
44 // Structure for storage the unique set of all savable resource links for 45 // Structure for storage the unique set of all savable resource links for
45 // making sure that no duplicated resource link in final result. The consumer 46 // making sure that no duplicated resource link in final result. The consumer
46 // of the SavableResourcesUniqueCheck is responsible for keeping these pointers 47 // of the SavableResourcesUniqueCheck is responsible for keeping these pointers
47 // valid for the lifetime of the SavableResourcesUniqueCheck instance. 48 // valid for the lifetime of the SavableResourcesUniqueCheck instance.
48 struct SavableResourcesUniqueCheck { 49 struct SavableResourcesUniqueCheck {
49 // Unique set of all sub resource links. 50 // Unique set of all sub resource links.
50 std::set<GURL>* resources_set; 51 std::set<GURL>* resources_set;
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 CastHTMLElement<WebCore::HTMLMetaElement>( 774 CastHTMLElement<WebCore::HTMLMetaElement>(
774 child, WebCore::HTMLNames::metaTag); 775 child, WebCore::HTMLNames::metaTag);
775 if (meta) { 776 if (meta) {
776 if (meta->name() == String("application-name")) { 777 if (meta->name() == String("application-name")) {
777 app_info->title = webkit_glue::StringToStdWString(meta->content()); 778 app_info->title = webkit_glue::StringToStdWString(meta->content());
778 } else if (meta->name() == String("description")) { 779 } else if (meta->name() == String("description")) {
779 app_info->description = 780 app_info->description =
780 webkit_glue::StringToStdWString(meta->content()); 781 webkit_glue::StringToStdWString(meta->content());
781 } else if (meta->name() == String("application-url")) { 782 } else if (meta->name() == String("application-url")) {
782 std::string url = webkit_glue::StringToStdString(meta->content()); 783 std::string url = webkit_glue::StringToStdString(meta->content());
783 GURL main_url = main_frame->GetURL(); 784 GURL main_url = main_frame->url();
784 app_info->app_url = main_url.is_valid() ? 785 app_info->app_url = main_url.is_valid() ?
785 main_url.Resolve(url) : GURL(url); 786 main_url.Resolve(url) : GURL(url);
786 if (!app_info->app_url.is_valid()) 787 if (!app_info->app_url.is_valid())
787 app_info->app_url = GURL(); 788 app_info->app_url = GURL();
788 } 789 }
789 } 790 }
790 } 791 }
791 } 792 }
792 } 793 }
793 794
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 return static_cast<WebCore::HTMLInputElement*>(element); 875 return static_cast<WebCore::HTMLInputElement*>(element);
875 } 876 }
876 877
877 WebCore::HTMLInputElement* NodeToHTMLInputElement(WebCore::Node* node) { 878 WebCore::HTMLInputElement* NodeToHTMLInputElement(WebCore::Node* node) {
878 if (node->nodeType() != WebCore::Node::ELEMENT_NODE) 879 if (node->nodeType() != WebCore::Node::ELEMENT_NODE)
879 return NULL; 880 return NULL;
880 return ElementToHTMLInputElement(static_cast<WebCore::Element*>(node)); 881 return ElementToHTMLInputElement(static_cast<WebCore::Element*>(node));
881 } 882 }
882 883
883 } // webkit_glue 884 } // webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/devtools/dom_agent_unittest.cc ('k') | webkit/glue/dom_operations_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698