Chromium Code Reviews| 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 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 if (top_container_index >= 0) | 2221 if (top_container_index >= 0) |
| 2222 AddChildViewAt(bookmark_bar_view_.get(), top_container_index); | 2222 AddChildViewAt(bookmark_bar_view_.get(), top_container_index); |
| 2223 else | 2223 else |
| 2224 AddChildView(bookmark_bar_view_.get()); | 2224 AddChildView(bookmark_bar_view_.get()); |
| 2225 } else if (new_parent == top_container_) { | |
| 2226 // Stack the |bookmark_bar_view_| behind the |toolbar_| surface so that | |
| 2227 // |toolbar_| ink drops are visible on top of the |bookmark_bar_view_|. | |
| 2228 new_parent->AddChildViewAt(bookmark_bar_view_.get(), 0); | |
|
Peter Kasting
2016/03/30 21:15:28
This may be better for sky than me; I'm not famili
bruthig
2016/03/30 21:27:00
As far as I can tell a user cannot tab between the
Peter Kasting
2016/03/30 21:28:42
Is the taborder between the toolbar children and t
sky
2016/03/31 01:07:16
Tab does wrap within the bookmarkbar. You can cycl
bruthig
2016/03/31 21:12:29
I'm slightly confused here, are there outstanding
Peter Kasting
2016/03/31 21:20:41
As long as it's not possible to actually tab direc
bruthig
2016/03/31 22:04:23
That is correct. Tab's will stay within the same
| |
| 2225 } else if (new_parent) { | 2229 } else if (new_parent) { |
| 2226 // No special stacking is required for other parents. | 2230 // No special stacking is required for other parents. |
| 2227 new_parent->AddChildView(bookmark_bar_view_.get()); | 2231 new_parent->AddChildView(bookmark_bar_view_.get()); |
| 2228 } else { | 2232 } else { |
| 2229 // Bookmark bar is being detached from all views because it is hidden. | 2233 // Bookmark bar is being detached from all views because it is hidden. |
| 2230 bookmark_bar_view_->parent()->RemoveChildView(bookmark_bar_view_.get()); | 2234 bookmark_bar_view_->parent()->RemoveChildView(bookmark_bar_view_.get()); |
| 2231 } | 2235 } |
| 2232 } | 2236 } |
| 2233 | 2237 |
| 2234 bool BrowserView::MaybeShowInfoBar(WebContents* contents) { | 2238 bool BrowserView::MaybeShowInfoBar(WebContents* contents) { |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2645 } | 2649 } |
| 2646 | 2650 |
| 2647 extensions::ActiveTabPermissionGranter* | 2651 extensions::ActiveTabPermissionGranter* |
| 2648 BrowserView::GetActiveTabPermissionGranter() { | 2652 BrowserView::GetActiveTabPermissionGranter() { |
| 2649 content::WebContents* web_contents = GetActiveWebContents(); | 2653 content::WebContents* web_contents = GetActiveWebContents(); |
| 2650 if (!web_contents) | 2654 if (!web_contents) |
| 2651 return nullptr; | 2655 return nullptr; |
| 2652 return extensions::TabHelper::FromWebContents(web_contents) | 2656 return extensions::TabHelper::FromWebContents(web_contents) |
| 2653 ->active_tab_permission_granter(); | 2657 ->active_tab_permission_granter(); |
| 2654 } | 2658 } |
| OLD | NEW |