| 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 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1928 return kViewClassName; | 1928 return kViewClassName; |
| 1929 } | 1929 } |
| 1930 | 1930 |
| 1931 void BrowserView::Layout() { | 1931 void BrowserView::Layout() { |
| 1932 if (!initialized_ || in_process_fullscreen_) | 1932 if (!initialized_ || in_process_fullscreen_) |
| 1933 return; | 1933 return; |
| 1934 | 1934 |
| 1935 views::View::Layout(); | 1935 views::View::Layout(); |
| 1936 | 1936 |
| 1937 // TODO(jamescook): Why was this in the middle of layout code? | 1937 // TODO(jamescook): Why was this in the middle of layout code? |
| 1938 toolbar_->location_bar()->omnibox_view()->SetFocusable(IsToolbarVisible()); | 1938 toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( |
| 1939 IsToolbarVisible() ? FocusBehavior::ALWAYS : FocusBehavior::NEVER); |
| 1939 } | 1940 } |
| 1940 | 1941 |
| 1941 void BrowserView::ViewHierarchyChanged( | 1942 void BrowserView::ViewHierarchyChanged( |
| 1942 const ViewHierarchyChangedDetails& details) { | 1943 const ViewHierarchyChangedDetails& details) { |
| 1943 if (!initialized_ && details.is_add && details.child == this && GetWidget()) { | 1944 if (!initialized_ && details.is_add && details.child == this && GetWidget()) { |
| 1944 InitViews(); | 1945 InitViews(); |
| 1945 initialized_ = true; | 1946 initialized_ = true; |
| 1946 } | 1947 } |
| 1947 } | 1948 } |
| 1948 | 1949 |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2646 } | 2647 } |
| 2647 | 2648 |
| 2648 extensions::ActiveTabPermissionGranter* | 2649 extensions::ActiveTabPermissionGranter* |
| 2649 BrowserView::GetActiveTabPermissionGranter() { | 2650 BrowserView::GetActiveTabPermissionGranter() { |
| 2650 content::WebContents* web_contents = GetActiveWebContents(); | 2651 content::WebContents* web_contents = GetActiveWebContents(); |
| 2651 if (!web_contents) | 2652 if (!web_contents) |
| 2652 return nullptr; | 2653 return nullptr; |
| 2653 return extensions::TabHelper::FromWebContents(web_contents) | 2654 return extensions::TabHelper::FromWebContents(web_contents) |
| 2654 ->active_tab_permission_granter(); | 2655 ->active_tab_permission_granter(); |
| 2655 } | 2656 } |
| OLD | NEW |