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

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

Issue 1849563002: Re-order the BookmarkBarView to be behind the ToolbarView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | ui/views/animation/ink_drop_host_view.cc » ('j') | 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 <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 needs_layout = true; 2211 needs_layout = true;
2212 2212
2213 return needs_layout; 2213 return needs_layout;
2214 } 2214 }
2215 2215
2216 void BrowserView::SetBookmarkBarParent(views::View* new_parent) { 2216 void BrowserView::SetBookmarkBarParent(views::View* new_parent) {
2217 if (new_parent == this) { 2217 if (new_parent == this) {
2218 // Add it underneath |top_container_| or at the end if top container isn't 2218 // Add it underneath |top_container_| or at the end if top container isn't
2219 // found. 2219 // found.
2220 int top_container_index = GetIndexOf(top_container_); 2220 int top_container_index = GetIndexOf(top_container_);
2221 LOG(ERROR) << " *** Adding |bookmark_bar_view_| to '" << new_parent->GetClas sName() << "' top_container_index=" << top_container_index;
2221 if (top_container_index >= 0) 2222 if (top_container_index >= 0)
2222 AddChildViewAt(bookmark_bar_view_.get(), top_container_index); 2223 AddChildViewAt(bookmark_bar_view_.get(), top_container_index);
2223 else 2224 else
2224 AddChildView(bookmark_bar_view_.get()); 2225 AddChildView(bookmark_bar_view_.get());
2225 } else if (new_parent) { 2226 } else if (new_parent) {
2226 // No special stacking is required for other parents. 2227 // No special stacking is required for other parents.
2228 LOG(ERROR) << " *** Adding |bookmark_bar_view_| to '" << new_parent->GetClas sName() << "'";
2227 new_parent->AddChildView(bookmark_bar_view_.get()); 2229 new_parent->AddChildView(bookmark_bar_view_.get());
2230 // new_parent->AddChildViewAt(bookmark_bar_view_.get(), 0);
bruthig 2016/03/30 19:52:43 This is the actual desired change here.
2228 } else { 2231 } else {
2229 // Bookmark bar is being detached from all views because it is hidden. 2232 // Bookmark bar is being detached from all views because it is hidden.
2233 LOG(ERROR) << " *** Removing |bookmark_bar_view_| from '" << bookmark_bar_vi ew_->parent()->GetClassName() << "'";
2230 bookmark_bar_view_->parent()->RemoveChildView(bookmark_bar_view_.get()); 2234 bookmark_bar_view_->parent()->RemoveChildView(bookmark_bar_view_.get());
2231 } 2235 }
2236 #if !defined(NDEBUG)
2237 LOG(ERROR) << " *** " << PrintViewGraph(true);
2238 #endif
2232 } 2239 }
2233 2240
2234 bool BrowserView::MaybeShowInfoBar(WebContents* contents) { 2241 bool BrowserView::MaybeShowInfoBar(WebContents* contents) {
2235 // TODO(beng): Remove this function once the interface between 2242 // TODO(beng): Remove this function once the interface between
2236 // InfoBarContainer, DownloadShelfView and WebContents and this 2243 // InfoBarContainer, DownloadShelfView and WebContents and this
2237 // view is sorted out. 2244 // view is sorted out.
2238 return true; 2245 return true;
2239 } 2246 }
2240 2247
2241 void BrowserView::UpdateDevToolsForContents( 2248 void BrowserView::UpdateDevToolsForContents(
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 } 2652 }
2646 2653
2647 extensions::ActiveTabPermissionGranter* 2654 extensions::ActiveTabPermissionGranter*
2648 BrowserView::GetActiveTabPermissionGranter() { 2655 BrowserView::GetActiveTabPermissionGranter() {
2649 content::WebContents* web_contents = GetActiveWebContents(); 2656 content::WebContents* web_contents = GetActiveWebContents();
2650 if (!web_contents) 2657 if (!web_contents)
2651 return nullptr; 2658 return nullptr;
2652 return extensions::TabHelper::FromWebContents(web_contents) 2659 return extensions::TabHelper::FromWebContents(web_contents)
2653 ->active_tab_permission_granter(); 2660 ->active_tab_permission_granter();
2654 } 2661 }
OLDNEW
« no previous file with comments | « no previous file | ui/views/animation/ink_drop_host_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698