OLD | NEW |
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 #ifndef WEBKIT_GLUE_WEBFRAME_H__ | 5 #ifndef WEBKIT_GLUE_WEBFRAME_H_ |
6 #define WEBKIT_GLUE_WEBFRAME_H__ | 6 #define WEBKIT_GLUE_WEBFRAME_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
12 #include "base/gfx/bitmap_platform_device.h" | 12 #include "base/gfx/bitmap_platform_device.h" |
13 #include "base/gfx/size.h" | 13 #include "base/gfx/size.h" |
14 #include "webkit/glue/console_message_level.h" | 14 #include "webkit/glue/console_message_level.h" |
15 #include "webkit/glue/find_in_page_request.h" | 15 #include "webkit/glue/find_in_page_request.h" |
16 | 16 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // uses an index into the tick-mark vector to figure out what the next | 196 // uses an index into the tick-mark vector to figure out what the next |
197 // match is, alleviating the need to call findString on the content again. | 197 // match is, alleviating the need to call findString on the content again. |
198 // | 198 // |
199 // Returns true if the search string was found, false otherwise. | 199 // Returns true if the search string was found, false otherwise. |
200 virtual bool FindNext(const FindInPageRequest& request, | 200 virtual bool FindNext(const FindInPageRequest& request, |
201 bool wrap_within_frame) = 0; | 201 bool wrap_within_frame) = 0; |
202 | 202 |
203 // Notifies the frame that we are no longer interested in searching. This will | 203 // Notifies the frame that we are no longer interested in searching. This will |
204 // abort any asynchronous scoping effort already under way (see the function | 204 // abort any asynchronous scoping effort already under way (see the function |
205 // ScopeStringMatches for details) and erase all tick-marks and highlighting | 205 // ScopeStringMatches for details) and erase all tick-marks and highlighting |
206 // from the previous search. | 206 // from the previous search. If |clear_selection| is true, it will also make |
207 virtual void StopFinding() = 0; | 207 // sure the end state for the Find operation does not leave a selection. |
| 208 // This can occur when the user clears the search string but does not close |
| 209 // the find box. |
| 210 virtual void StopFinding(bool clear_selection) = 0; |
208 | 211 |
209 // Counts how many times a particular string occurs within the frame. It | 212 // Counts how many times a particular string occurs within the frame. It |
210 // also retrieves the location of the string and updates a vector in the frame | 213 // also retrieves the location of the string and updates a vector in the frame |
211 // so that tick-marks and highlighting can be drawn. This function does its | 214 // so that tick-marks and highlighting can be drawn. This function does its |
212 // work asynchronously, by running for a certain time-slice and then | 215 // work asynchronously, by running for a certain time-slice and then |
213 // scheduling itself (co-operative multitasking) to be invoked later | 216 // scheduling itself (co-operative multitasking) to be invoked later |
214 // (repeating the process until all matches have been found). This allows | 217 // (repeating the process until all matches have been found). This allows |
215 // multiple frames to be searched at the same time and provides a way to | 218 // multiple frames to be searched at the same time and provides a way to |
216 // cancel at any time (see CancelPendingScopingEffort). The parameter Request | 219 // cancel at any time (see CancelPendingScopingEffort). The parameter Request |
217 // specifies what to look for and Reset signals whether this is a brand new | 220 // specifies what to look for and Reset signals whether this is a brand new |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 | 348 |
346 // Does this frame have an onunload or unbeforeunload event listener? | 349 // Does this frame have an onunload or unbeforeunload event listener? |
347 virtual bool HasUnloadListener() = 0; | 350 virtual bool HasUnloadListener() = 0; |
348 | 351 |
349 // Is this frame reloading with allowing stale data? This will be true when | 352 // Is this frame reloading with allowing stale data? This will be true when |
350 // the encoding of the page is changed and it needs to be re-interpreted, | 353 // the encoding of the page is changed and it needs to be re-interpreted, |
351 // but no additional loads should occur. | 354 // but no additional loads should occur. |
352 virtual bool IsReloadAllowingStaleData() const = 0; | 355 virtual bool IsReloadAllowingStaleData() const = 0; |
353 | 356 |
354 private: | 357 private: |
355 DISALLOW_EVIL_CONSTRUCTORS(WebFrame); | 358 DISALLOW_COPY_AND_ASSIGN(WebFrame); |
356 }; | 359 }; |
357 | 360 |
358 #endif // WEBKIT_GLUE_WEBFRAME_H__ | 361 #endif // WEBKIT_GLUE_WEBFRAME_H_ |
359 | |
OLD | NEW |