OLD | NEW |
---|---|
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 Loading... | |
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()); | 2181 DCHECK(!jumplist_); |
2182 jumplist_ = JumpListFactory::GetForProfile(browser_->profile()); | 2182 jumplist_ = JumpListFactory::GetForProfile(browser_->profile()); |
grt (UTC plus 2)
2017/06/13 07:32:27
on the other hand, is this jumplist_ member even n
chengx
2017/06/13 19:16:01
I don't think |jumplist_| is needed, so removed it
| |
2183 #endif | 2183 #endif |
2184 } | 2184 } |
2185 | 2185 |
2186 BrowserViewLayout* BrowserView::GetBrowserViewLayout() const { | 2186 BrowserViewLayout* BrowserView::GetBrowserViewLayout() const { |
2187 return static_cast<BrowserViewLayout*>(GetLayoutManager()); | 2187 return static_cast<BrowserViewLayout*>(GetLayoutManager()); |
2188 } | 2188 } |
2189 | 2189 |
2190 ContentsLayoutManager* BrowserView::GetContentsLayoutManager() const { | 2190 ContentsLayoutManager* BrowserView::GetContentsLayoutManager() const { |
2191 return static_cast<ContentsLayoutManager*>( | 2191 return static_cast<ContentsLayoutManager*>( |
2192 contents_container_->GetLayoutManager()); | 2192 contents_container_->GetLayoutManager()); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2680 } | 2680 } |
2681 | 2681 |
2682 extensions::ActiveTabPermissionGranter* | 2682 extensions::ActiveTabPermissionGranter* |
2683 BrowserView::GetActiveTabPermissionGranter() { | 2683 BrowserView::GetActiveTabPermissionGranter() { |
2684 content::WebContents* web_contents = GetActiveWebContents(); | 2684 content::WebContents* web_contents = GetActiveWebContents(); |
2685 if (!web_contents) | 2685 if (!web_contents) |
2686 return nullptr; | 2686 return nullptr; |
2687 return extensions::TabHelper::FromWebContents(web_contents) | 2687 return extensions::TabHelper::FromWebContents(web_contents) |
2688 ->active_tab_permission_granter(); | 2688 ->active_tab_permission_granter(); |
2689 } | 2689 } |
OLD | NEW |