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

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

Issue 2931573003: Fix stability and data racing issues, coalesce more updates for JumpList (Closed)
Patch Set: Remove refcounting for jumplist KeyedService, fix nits. Created 3 years, 6 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 unified diff | Download patch
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 browser_->tab_strip_model()->GetActiveWebContents(); 2171 browser_->tab_strip_model()->GetActiveWebContents();
2172 // GetActiveWebContents can return null for example under Purify when 2172 // GetActiveWebContents can return null for example under Purify when
2173 // the animations are running slowly and this function is called on a timer 2173 // the animations are running slowly and this function is called on a timer
2174 // through LoadingAnimationCallback. 2174 // through LoadingAnimationCallback.
2175 frame_->UpdateThrobber(web_contents && web_contents->IsLoading()); 2175 frame_->UpdateThrobber(web_contents && web_contents->IsLoading());
2176 } 2176 }
2177 } 2177 }
2178 2178
2179 void BrowserView::OnLoadCompleted() { 2179 void BrowserView::OnLoadCompleted() {
2180 #if defined(OS_WIN) 2180 #if defined(OS_WIN)
2181 DCHECK(!jumplist_.get());
grt (UTC plus 2) 2017/06/12 20:43:38 this was failing because the member was uninitiali
chengx 2017/06/12 22:05:30 Done.
2182 jumplist_ = JumpListFactory::GetForProfile(browser_->profile()); 2181 jumplist_ = JumpListFactory::GetForProfile(browser_->profile());
2183 #endif 2182 #endif
2184 } 2183 }
2185 2184
2186 BrowserViewLayout* BrowserView::GetBrowserViewLayout() const { 2185 BrowserViewLayout* BrowserView::GetBrowserViewLayout() const {
2187 return static_cast<BrowserViewLayout*>(GetLayoutManager()); 2186 return static_cast<BrowserViewLayout*>(GetLayoutManager());
2188 } 2187 }
2189 2188
2190 ContentsLayoutManager* BrowserView::GetContentsLayoutManager() const { 2189 ContentsLayoutManager* BrowserView::GetContentsLayoutManager() const {
2191 return static_cast<ContentsLayoutManager*>( 2190 return static_cast<ContentsLayoutManager*>(
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2680 } 2679 }
2681 2680
2682 extensions::ActiveTabPermissionGranter* 2681 extensions::ActiveTabPermissionGranter*
2683 BrowserView::GetActiveTabPermissionGranter() { 2682 BrowserView::GetActiveTabPermissionGranter() {
2684 content::WebContents* web_contents = GetActiveWebContents(); 2683 content::WebContents* web_contents = GetActiveWebContents();
2685 if (!web_contents) 2684 if (!web_contents)
2686 return nullptr; 2685 return nullptr;
2687 return extensions::TabHelper::FromWebContents(web_contents) 2686 return extensions::TabHelper::FromWebContents(web_contents)
2688 ->active_tab_permission_granter(); 2687 ->active_tab_permission_granter();
2689 } 2688 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698