OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/gtest_prod_util.h" | 11 #include "base/gtest_prod_util.h" |
12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "content/browser/ssl/ssl_manager.h" | 14 #include "content/browser/ssl/ssl_manager.h" |
15 #include "content/public/browser/navigation_controller.h" | 15 #include "content/public/browser/navigation_controller.h" |
16 #include "content/public/browser/navigation_type.h" | 16 #include "content/public/browser/navigation_type.h" |
17 | 17 |
18 struct ViewHostMsg_FrameNavigate_Params; | 18 struct ViewHostMsg_FrameNavigate_Params; |
19 | 19 |
20 namespace skia { | |
21 class PlatformBitmap; | |
22 } | |
23 | |
20 namespace content { | 24 namespace content { |
21 class NavigationEntryImpl; | 25 class NavigationEntryImpl; |
22 class WebContentsImpl; | 26 class WebContentsImpl; |
23 class SiteInstance; | 27 class SiteInstance; |
24 struct LoadCommittedDetails; | 28 struct LoadCommittedDetails; |
25 | 29 |
26 class CONTENT_EXPORT NavigationControllerImpl | 30 class CONTENT_EXPORT NavigationControllerImpl |
27 : public NON_EXPORTED_BASE(NavigationController) { | 31 : public NON_EXPORTED_BASE(NavigationController) { |
28 public: | 32 public: |
29 NavigationControllerImpl( | 33 NavigationControllerImpl( |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 // Inserts up to |max_index| entries from |source| into this. This does NOT | 305 // Inserts up to |max_index| entries from |source| into this. This does NOT |
302 // adjust any of the members that reference entries_ | 306 // adjust any of the members that reference entries_ |
303 // (last_committed_entry_index_, pending_entry_index_ or | 307 // (last_committed_entry_index_, pending_entry_index_ or |
304 // transient_entry_index_). | 308 // transient_entry_index_). |
305 void InsertEntriesFrom(const NavigationControllerImpl& source, int max_index); | 309 void InsertEntriesFrom(const NavigationControllerImpl& source, int max_index); |
306 | 310 |
307 // Returns the navigation index that differs from the current entry by the | 311 // Returns the navigation index that differs from the current entry by the |
308 // specified |offset|. The index returned is not guaranteed to be valid. | 312 // specified |offset|. The index returned is not guaranteed to be valid. |
309 int GetIndexForOffset(int offset) const; | 313 int GetIndexForOffset(int offset) const; |
310 | 314 |
315 // Takes a screenshot of the page at the current state. | |
316 void TakeScreenshot(); | |
317 | |
318 // The callback invoked when taking the screenshot of the page is complete. | |
319 // This sets the screenshot on the navigation entry. | |
320 void TakingScreenshotComplete(int unique_id, | |
Charlie Reis
2012/12/21 23:22:07
Maybe "OnScreenshotTaken"? Or is that too close t
sadrul
2012/12/22 00:07:10
I think OnXXYY is quite common in non-IPC code too
| |
321 skia::PlatformBitmap* bitmap, | |
322 bool success); | |
323 | |
311 // --------------------------------------------------------------------------- | 324 // --------------------------------------------------------------------------- |
312 | 325 |
313 // The user browser context associated with this controller. | 326 // The user browser context associated with this controller. |
314 BrowserContext* browser_context_; | 327 BrowserContext* browser_context_; |
315 | 328 |
316 // List of NavigationEntry for this tab | 329 // List of NavigationEntry for this tab |
317 typedef std::vector<linked_ptr<NavigationEntryImpl> > NavigationEntries; | 330 typedef std::vector<linked_ptr<NavigationEntryImpl> > NavigationEntries; |
318 NavigationEntries entries_; | 331 NavigationEntries entries_; |
319 | 332 |
320 // An entry we haven't gotten a response for yet. This will be discarded | 333 // An entry we haven't gotten a response for yet. This will be discarded |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 // the timer resolution, leading to things sometimes showing up in | 397 // the timer resolution, leading to things sometimes showing up in |
385 // the wrong order in the history view. | 398 // the wrong order in the history view. |
386 TimeSmoother time_smoother_; | 399 TimeSmoother time_smoother_; |
387 | 400 |
388 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 401 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
389 }; | 402 }; |
390 | 403 |
391 } // namespace content | 404 } // namespace content |
392 | 405 |
393 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ | 406 #endif // CONTENT_BROWSER_WEB_CONTENTS_NAVIGATION_CONTROLLER_IMPL_H_ |
OLD | NEW |