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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

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: Add JumpListListener Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h" 130 #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h"
131 #include "chrome/browser/ui/ash/window_positioner.h" 131 #include "chrome/browser/ui/ash/window_positioner.h"
132 #endif 132 #endif
133 133
134 #if defined(USE_AURA) 134 #if defined(USE_AURA)
135 #include "chrome/browser/ui/views/accelerator_table.h" 135 #include "chrome/browser/ui/views/accelerator_table.h"
136 #include "chrome/browser/ui/webui/task_manager/task_manager_dialog.h" 136 #include "chrome/browser/ui/webui/task_manager/task_manager_dialog.h"
137 #include "ui/aura/window.h" 137 #include "ui/aura/window.h"
138 #include "ui/gfx/screen.h" 138 #include "ui/gfx/screen.h"
139 #elif defined(OS_WIN) // !defined(USE_AURA) 139 #elif defined(OS_WIN) // !defined(USE_AURA)
140 #include "chrome/browser/jumplist_listener.h"
140 #include "chrome/browser/jumplist_win.h" 141 #include "chrome/browser/jumplist_win.h"
141 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" 142 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h"
142 #include "ui/views/widget/native_widget_win.h" 143 #include "ui/views/widget/native_widget_win.h"
143 #include "ui/views/win/scoped_fullscreen_visibility.h" 144 #include "ui/views/win/scoped_fullscreen_visibility.h"
144 #endif 145 #endif
145 146
146 #if defined(OS_WIN) 147 #if defined(OS_WIN)
147 #include "win8/util/win8_util.h" 148 #include "win8/util/win8_util.h"
148 #endif 149 #endif
149 150
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2216 views::Background::CreateSolidBackground(bg_color)); 2217 views::Background::CreateSolidBackground(bg_color));
2217 AddChildView(contents_split_); 2218 AddChildView(contents_split_);
2218 set_contents_view(contents_split_); 2219 set_contents_view(contents_split_);
2219 2220
2220 status_bubble_.reset(new StatusBubbleViews(contents_)); 2221 status_bubble_.reset(new StatusBubbleViews(contents_));
2221 2222
2222 #if defined(OS_WIN) && !defined(USE_AURA) 2223 #if defined(OS_WIN) && !defined(USE_AURA)
2223 // Create a custom JumpList and add it to an observer of TabRestoreService 2224 // Create a custom JumpList and add it to an observer of TabRestoreService
2224 // so we can update the custom JumpList when a tab is added or removed. 2225 // so we can update the custom JumpList when a tab is added or removed.
2225 if (JumpList::Enabled()) { 2226 if (JumpList::Enabled()) {
2226 jumplist_ = new JumpList(); 2227 jumplist_listener_ .reset(new JumpListListener(
sky 2012/12/18 20:52:38 You've got a space after jumplist_listener_
Cait (Slow) 2012/12/19 19:27:01 Done.
2227 jumplist_->AddObserver(browser_->profile()); 2228 base::Bind(&BrowserView::CreateJumpList, base::Unretained(this))));
2228 } 2229 }
2229 #endif 2230 #endif
2230 2231
2231 // We're now initialized and ready to process Layout requests. 2232 // We're now initialized and ready to process Layout requests.
2232 ignore_layout_ = false; 2233 ignore_layout_ = false;
2233 } 2234 }
2234 2235
2235 void BrowserView::LoadingAnimationCallback() { 2236 void BrowserView::LoadingAnimationCallback() {
2236 base::TimeTicks now = base::TimeTicks::Now(); 2237 base::TimeTicks now = base::TimeTicks::Now();
2237 if (!last_animation_time_.is_null()) { 2238 if (!last_animation_time_.is_null()) {
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2801 modal_browser->window()->Activate(); 2802 modal_browser->window()->Activate();
2802 } 2803 }
2803 2804
2804 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2805 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2805 } 2806 }
2806 2807
2807 void BrowserView::MaybeStackBookmarkBarAtTop() { 2808 void BrowserView::MaybeStackBookmarkBarAtTop() {
2808 if (bookmark_bar_view_.get()) 2809 if (bookmark_bar_view_.get())
2809 bookmark_bar_view_->MaybeStackAtTop(); 2810 bookmark_bar_view_->MaybeStackAtTop();
2810 } 2811 }
2812
2813 #if defined(OS_WIN) && !defined(USE_AURA)
2814 void BrowserView::CreateJumpList() {
2815 if (!jumplist_) {
sky 2012/12/18 20:52:38 Why the if check here? It should be a DCHECK.
Cait (Slow) 2012/12/19 19:27:01 Done.
2816 jumplist_ = new JumpList();
2817 jumplist_->AddObserver(browser_->profile());
2818 }
2819 }
2820 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698