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

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

Issue 549953003: Hide "New incognito window" from jump list if disabled by policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 3 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
« no previous file with comments | « chrome/browser/jumplist_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 // GetActiveWebContents can return NULL for example under Purify when 2013 // GetActiveWebContents can return NULL for example under Purify when
2014 // the animations are running slowly and this function is called on a timer 2014 // the animations are running slowly and this function is called on a timer
2015 // through LoadingAnimationCallback. 2015 // through LoadingAnimationCallback.
2016 frame_->UpdateThrobber(web_contents && web_contents->IsLoading()); 2016 frame_->UpdateThrobber(web_contents && web_contents->IsLoading());
2017 } 2017 }
2018 } 2018 }
2019 2019
2020 void BrowserView::OnLoadCompleted() { 2020 void BrowserView::OnLoadCompleted() {
2021 #if defined(OS_WIN) 2021 #if defined(OS_WIN)
2022 DCHECK(!jumplist_); 2022 DCHECK(!jumplist_);
2023 jumplist_ = new JumpList(); 2023 jumplist_ = new JumpList(browser_->profile());
2024 jumplist_->AddObserver(browser_->profile());
2025 #endif 2024 #endif
2026 } 2025 }
2027 2026
2028 BrowserViewLayout* BrowserView::GetBrowserViewLayout() const { 2027 BrowserViewLayout* BrowserView::GetBrowserViewLayout() const {
2029 return static_cast<BrowserViewLayout*>(GetLayoutManager()); 2028 return static_cast<BrowserViewLayout*>(GetLayoutManager());
2030 } 2029 }
2031 2030
2032 ContentsLayoutManager* BrowserView::GetContentsLayoutManager() const { 2031 ContentsLayoutManager* BrowserView::GetContentsLayoutManager() const {
2033 return static_cast<ContentsLayoutManager*>( 2032 return static_cast<ContentsLayoutManager*>(
2034 contents_container_->GetLayoutManager()); 2033 contents_container_->GetLayoutManager());
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2545 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2544 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2546 gfx::Point icon_bottom( 2545 gfx::Point icon_bottom(
2547 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2546 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2548 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2547 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2549 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2548 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2550 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2549 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2551 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2550 top_arrow_height = infobar_top.y() - icon_bottom.y();
2552 } 2551 }
2553 return top_arrow_height; 2552 return top_arrow_height;
2554 } 2553 }
OLDNEW
« no previous file with comments | « chrome/browser/jumplist_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698