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

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

Issue 48034: SSLPolicy Fix: Step 1.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 681
682 WebFrame* WebFrameImpl::GetParent() const { 682 WebFrame* WebFrameImpl::GetParent() const {
683 if (frame_) { 683 if (frame_) {
684 Frame *parent = frame_->tree()->parent(); 684 Frame *parent = frame_->tree()->parent();
685 if (parent) 685 if (parent)
686 return FromFrame(parent); 686 return FromFrame(parent);
687 } 687 }
688 return NULL; 688 return NULL;
689 } 689 }
690 690
691 WebFrame* WebFrameImpl::GetTop() const {
692 if (frame_)
693 return FromFrame(frame_->tree()->top());
694
695 return NULL;
696 }
697
691 WebFrame* WebFrameImpl::GetChildFrame(const std::wstring& xpath) const { 698 WebFrame* WebFrameImpl::GetChildFrame(const std::wstring& xpath) const {
692 // xpath string can represent a frame deep down the tree (across multiple 699 // xpath string can represent a frame deep down the tree (across multiple
693 // frame DOMs). 700 // frame DOMs).
694 // Example, /html/body/table/tbody/tr/td/iframe\n/frameset/frame[0] 701 // Example, /html/body/table/tbody/tr/td/iframe\n/frameset/frame[0]
695 // should break into 2 xpaths 702 // should break into 2 xpaths
696 // /html/body/table/tbody/tr/td/iframe & /frameset/frame[0] 703 // /html/body/table/tbody/tr/td/iframe & /frameset/frame[0]
697 704
698 if (xpath.empty()) 705 if (xpath.empty())
699 return NULL; 706 return NULL;
700 707
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 if (frame_) 754 if (frame_)
748 return frame_->inViewSourceMode(); 755 return frame_->inViewSourceMode();
749 756
750 return false; 757 return false;
751 } 758 }
752 759
753 WebView* WebFrameImpl::GetView() const { 760 WebView* WebFrameImpl::GetView() const {
754 return webview_impl_; 761 return webview_impl_;
755 } 762 }
756 763
764 std::string WebFrameImpl::GetSecurityOrigin() const {
765 if (frame_) {
766 if (frame_->document())
767 return webkit_glue::StringToStdString(
768 frame_->document()->securityOrigin()->toString());
769 }
770 return "null";
771 }
772
757 void WebFrameImpl::BindToWindowObject(const std::wstring& name, 773 void WebFrameImpl::BindToWindowObject(const std::wstring& name,
758 NPObject* object) { 774 NPObject* object) {
759 assert(frame_); 775 assert(frame_);
760 if (!frame_ || !frame_->script()->isEnabled()) 776 if (!frame_ || !frame_->script()->isEnabled())
761 return; 777 return;
762 778
763 // TODO(mbelshe): Move this to the ScriptController and make it JS neutral. 779 // TODO(mbelshe): Move this to the ScriptController and make it JS neutral.
764 780
765 String key = webkit_glue::StdWStringToString(name); 781 String key = webkit_glue::StdWStringToString(name);
766 #if USE(V8) 782 #if USE(V8)
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 return password_listeners_.get(input_element); 1934 return password_listeners_.get(input_element);
1919 } 1935 }
1920 1936
1921 void WebFrameImpl::ClearPasswordListeners() { 1937 void WebFrameImpl::ClearPasswordListeners() {
1922 for (PasswordListenerMap::iterator iter = password_listeners_.begin(); 1938 for (PasswordListenerMap::iterator iter = password_listeners_.begin();
1923 iter != password_listeners_.end(); ++iter) { 1939 iter != password_listeners_.end(); ++iter) {
1924 delete iter->second; 1940 delete iter->second;
1925 } 1941 }
1926 password_listeners_.clear(); 1942 password_listeners_.clear();
1927 } 1943 }
OLDNEW
« no previous file with comments | « webkit/glue/webframe_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698