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

Side by Side Diff: content/browser/frame_host/navigation_controller_impl.h

Issue 1440573003: Remove ScopedVector from NavigationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 1 month 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
7 7
8 #include <vector>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
11 #include "base/memory/scoped_vector.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "build/build_config.h" 14 #include "build/build_config.h"
14 #include "content/browser/frame_host/navigation_controller_delegate.h" 15 #include "content/browser/frame_host/navigation_controller_delegate.h"
15 #include "content/browser/frame_host/navigation_entry_impl.h" 16 #include "content/browser/frame_host/navigation_entry_impl.h"
16 #include "content/browser/ssl/ssl_manager.h" 17 #include "content/browser/ssl/ssl_manager.h"
17 #include "content/public/browser/navigation_controller.h" 18 #include "content/public/browser/navigation_controller.h"
18 #include "content/public/browser/navigation_type.h" 19 #include "content/public/browser/navigation_type.h"
19 20
20 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 21 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
21 22
(...skipping 11 matching lines...) Expand all
33 NavigationControllerDelegate* delegate, 34 NavigationControllerDelegate* delegate,
34 BrowserContext* browser_context); 35 BrowserContext* browser_context);
35 ~NavigationControllerImpl() override; 36 ~NavigationControllerImpl() override;
36 37
37 // NavigationController implementation: 38 // NavigationController implementation:
38 WebContents* GetWebContents() const override; 39 WebContents* GetWebContents() const override;
39 BrowserContext* GetBrowserContext() const override; 40 BrowserContext* GetBrowserContext() const override;
40 void SetBrowserContext(BrowserContext* browser_context) override; 41 void SetBrowserContext(BrowserContext* browser_context) override;
41 void Restore(int selected_navigation, 42 void Restore(int selected_navigation,
42 RestoreType type, 43 RestoreType type,
43 ScopedVector<NavigationEntry>* entries) override; 44 std::vector<scoped_ptr<NavigationEntry>>* entries) override;
44 NavigationEntryImpl* GetActiveEntry() const override; 45 NavigationEntryImpl* GetActiveEntry() const override;
45 NavigationEntryImpl* GetVisibleEntry() const override; 46 NavigationEntryImpl* GetVisibleEntry() const override;
46 int GetCurrentEntryIndex() const override; 47 int GetCurrentEntryIndex() const override;
47 NavigationEntryImpl* GetLastCommittedEntry() const override; 48 NavigationEntryImpl* GetLastCommittedEntry() const override;
48 int GetLastCommittedEntryIndex() const override; 49 int GetLastCommittedEntryIndex() const override;
49 bool CanViewSource() const override; 50 bool CanViewSource() const override;
50 int GetEntryCount() const override; 51 int GetEntryCount() const override;
51 NavigationEntryImpl* GetEntryAtIndex(int index) const override; 52 NavigationEntryImpl* GetEntryAtIndex(int index) const override;
52 NavigationEntryImpl* GetEntryAtOffset(int offset) const override; 53 NavigationEntryImpl* GetEntryAtOffset(int offset) const override;
53 void DiscardNonCommittedEntries() override; 54 void DiscardNonCommittedEntries() override;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 346
346 // Returns the navigation index that differs from the current entry by the 347 // Returns the navigation index that differs from the current entry by the
347 // specified |offset|. The index returned is not guaranteed to be valid. 348 // specified |offset|. The index returned is not guaranteed to be valid.
348 int GetIndexForOffset(int offset) const; 349 int GetIndexForOffset(int offset) const;
349 350
350 // --------------------------------------------------------------------------- 351 // ---------------------------------------------------------------------------
351 352
352 // The user browser context associated with this controller. 353 // The user browser context associated with this controller.
353 BrowserContext* browser_context_; 354 BrowserContext* browser_context_;
354 355
355 // List of NavigationEntry for this tab 356 // List of |NavigationEntry|s for this controller.
356 using NavigationEntries = ScopedVector<NavigationEntryImpl>; 357 std::vector<scoped_ptr<NavigationEntryImpl>> entries_;
357 NavigationEntries entries_;
358 358
359 // An entry we haven't gotten a response for yet. This will be discarded 359 // An entry we haven't gotten a response for yet. This will be discarded
360 // when we navigate again. It's used only so we know what the currently 360 // when we navigate again. It's used only so we know what the currently
361 // displayed tab is. 361 // displayed tab is.
362 // 362 //
363 // This may refer to an item in the entries_ list if the pending_entry_index_ 363 // This may refer to an item in the entries_ list if the pending_entry_index_
364 // == -1, or it may be its own entry that should be deleted. Be careful with 364 // == -1, or it may be its own entry that should be deleted. Be careful with
365 // the memory management. 365 // the memory management.
366 NavigationEntryImpl* pending_entry_; 366 NavigationEntryImpl* pending_entry_;
367 367
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 TimeSmoother time_smoother_; 440 TimeSmoother time_smoother_;
441 441
442 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; 442 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_;
443 443
444 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); 444 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
445 }; 445 };
446 446
447 } // namespace content 447 } // namespace content
448 448
449 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ 449 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698