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

Unified Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 11515005: Delay updating jumplist to avoid blocking the file thread at start-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.h
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index 264b8740ad971091fc5f257994bb4aeb244e99c6..5b1d9d860611f72236896c2266f9e13a07fe5c29 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
#include "chrome/browser/ui/views/frame/browser_frame.h"
+#include "chrome/browser/ui/views/load_complete_listener.h"
#include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/models/simple_menu_model.h"
@@ -95,7 +96,8 @@ class BrowserView : public BrowserWindow,
public views::ClientView,
public InfoBarContainer::Delegate,
public views::SingleSplitViewListener,
- public gfx::SysColorChangeListener {
+ public gfx::SysColorChangeListener,
+ public LoadCompleteListener::Delegate {
public:
// The browser view's class name.
static const char kViewClassName[];
@@ -458,6 +460,10 @@ class BrowserView : public BrowserWindow,
// Callback for the loading animation(s) associated with this view.
virtual void LoadingAnimationCallback();
+ // LoadCompleteListener::Delegate implementation. Creates and initializes the
+ // |jumplist_| after the first page load.
+ virtual void OnLoadCompleted() OVERRIDE;
+
private:
friend class BrowserViewLayout;
FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest,
@@ -701,6 +707,9 @@ class BrowserView : public BrowserWindow,
// plugin window.
HungPluginAction hung_plugin_action_;
+ // Helper class to listen for completion of first page load.
+ scoped_ptr<LoadCompleteListener> load_complete_listener_;
+
// The custom JumpList for Windows 7.
scoped_refptr<JumpList> jumplist_;
#endif

Powered by Google App Engine
This is Rietveld 408576698