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

Side by Side Diff: third_party/WebKit/public/web/WebFrame.h

Issue 1407163002: Add feature use counting for window.external.AddSearchProvider (Blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: usecounter Created 5 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
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Ideally it seems blink::TextGranularity should be broken up into 111 // Ideally it seems blink::TextGranularity should be broken up into
112 // blink::TextGranularity and perhaps blink::TextBoundary and then 112 // blink::TextGranularity and perhaps blink::TextBoundary and then
113 // TextGranularity enum could be moved somewhere to public/, and we could 113 // TextGranularity enum could be moved somewhere to public/, and we could
114 // just use it here directly without introducing a new enum. 114 // just use it here directly without introducing a new enum.
115 enum TextGranularity { 115 enum TextGranularity {
116 CharacterGranularity = 0, 116 CharacterGranularity = 0,
117 WordGranularity, 117 WordGranularity,
118 TextGranularityLast = WordGranularity, 118 TextGranularityLast = WordGranularity,
119 }; 119 };
120 120
121 enum Feature {
122 ExternalAddSearchProvider = 0,
123 ExternalIsSearchProviderInstalled,
124 };
125
121 // Returns the number of live WebFrame objects, used for leak checking. 126 // Returns the number of live WebFrame objects, used for leak checking.
122 BLINK_EXPORT static int instanceCount(); 127 BLINK_EXPORT static int instanceCount();
123 128
124 virtual bool isWebLocalFrame() const = 0; 129 virtual bool isWebLocalFrame() const = 0;
125 virtual WebLocalFrame* toWebLocalFrame() = 0; 130 virtual WebLocalFrame* toWebLocalFrame() = 0;
126 virtual bool isWebRemoteFrame() const = 0; 131 virtual bool isWebRemoteFrame() const = 0;
127 virtual WebRemoteFrame* toWebRemoteFrame() = 0; 132 virtual WebRemoteFrame* toWebRemoteFrame() = 0;
128 133
129 BLINK_EXPORT bool swap(WebFrame*); 134 BLINK_EXPORT bool swap(WebFrame*);
130 135
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 bool inShadowTree() const { return m_scope == WebTreeScopeType::Shadow; } 694 bool inShadowTree() const { return m_scope == WebTreeScopeType::Shadow; }
690 695
691 #if ENABLE(OILPAN) 696 #if ENABLE(OILPAN)
692 static void traceFrames(Visitor*, WebFrame*); 697 static void traceFrames(Visitor*, WebFrame*);
693 static void traceFrames(InlinedGlobalMarkingVisitor, WebFrame*); 698 static void traceFrames(InlinedGlobalMarkingVisitor, WebFrame*);
694 void clearWeakFrames(Visitor*); 699 void clearWeakFrames(Visitor*);
695 void clearWeakFrames(InlinedGlobalMarkingVisitor); 700 void clearWeakFrames(InlinedGlobalMarkingVisitor);
696 #endif 701 #endif
697 #endif 702 #endif
698 703
704 virtual void countFeatureUse(Feature) = 0;
705
699 protected: 706 protected:
700 explicit WebFrame(WebTreeScopeType); 707 explicit WebFrame(WebTreeScopeType);
701 virtual ~WebFrame(); 708 virtual ~WebFrame();
702 709
703 // Sets the parent WITHOUT fulling adding it to the frame tree. 710 // Sets the parent WITHOUT fulling adding it to the frame tree.
704 // Used to lie to a local frame that is replacing a remote frame, 711 // Used to lie to a local frame that is replacing a remote frame,
705 // so it can properly start a navigation but wait to swap until 712 // so it can properly start a navigation but wait to swap until
706 // commit-time. 713 // commit-time.
707 void setParent(WebFrame*); 714 void setParent(WebFrame*);
708 715
(...skipping 27 matching lines...) Expand all
736 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; 743 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker;
737 }; 744 };
738 745
739 #if BLINK_IMPLEMENTATION 746 #if BLINK_IMPLEMENTATION
740 Frame* toCoreFrame(const WebFrame*); 747 Frame* toCoreFrame(const WebFrame*);
741 #endif 748 #endif
742 749
743 } // namespace blink 750 } // namespace blink
744 751
745 #endif 752 #endif
OLDNEW
« chrome/renderer/external_extension.cc ('K') | « third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698