| 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 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2055 contents_web_view_->SetEmbedFullscreenWidgetMode(true); | 2055 contents_web_view_->SetEmbedFullscreenWidgetMode(true); |
| 2056 | 2056 |
| 2057 web_contents_close_handler_.reset( | 2057 web_contents_close_handler_.reset( |
| 2058 new WebContentsCloseHandler(contents_web_view_)); | 2058 new WebContentsCloseHandler(contents_web_view_)); |
| 2059 | 2059 |
| 2060 devtools_web_view_ = new views::WebView(browser_->profile()); | 2060 devtools_web_view_ = new views::WebView(browser_->profile()); |
| 2061 devtools_web_view_->set_id(VIEW_ID_DEV_TOOLS_DOCKED); | 2061 devtools_web_view_->set_id(VIEW_ID_DEV_TOOLS_DOCKED); |
| 2062 devtools_web_view_->SetVisible(false); | 2062 devtools_web_view_->SetVisible(false); |
| 2063 | 2063 |
| 2064 contents_container_ = new views::View(); | 2064 contents_container_ = new views::View(); |
| 2065 contents_container_->set_background(views::Background::CreateSolidBackground( | 2065 |
| 2066 GetThemeProvider()->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND))); | 2066 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2067 switches::kNoUADependentBackground)) |
| 2068 contents_container_->set_background( |
| 2069 views::Background::CreateSolidBackground(GetThemeProvider()->GetColor( |
| 2070 ThemeProperties::COLOR_CONTROL_BACKGROUND))); |
| 2071 |
| 2067 contents_container_->AddChildView(devtools_web_view_); | 2072 contents_container_->AddChildView(devtools_web_view_); |
| 2068 contents_container_->AddChildView(contents_web_view_); | 2073 contents_container_->AddChildView(contents_web_view_); |
| 2069 contents_container_->SetLayoutManager(new ContentsLayoutManager( | 2074 contents_container_->SetLayoutManager(new ContentsLayoutManager( |
| 2070 devtools_web_view_, contents_web_view_)); | 2075 devtools_web_view_, contents_web_view_)); |
| 2071 AddChildView(contents_container_); | 2076 AddChildView(contents_container_); |
| 2072 set_contents_view(contents_container_); | 2077 set_contents_view(contents_container_); |
| 2073 | 2078 |
| 2074 // Top container holds tab strip and toolbar and lives at the front of the | 2079 // Top container holds tab strip and toolbar and lives at the front of the |
| 2075 // view hierarchy. | 2080 // view hierarchy. |
| 2076 top_container_ = new TopContainerView(this); | 2081 top_container_ = new TopContainerView(this); |
| (...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2643 } | 2648 } |
| 2644 | 2649 |
| 2645 extensions::ActiveTabPermissionGranter* | 2650 extensions::ActiveTabPermissionGranter* |
| 2646 BrowserView::GetActiveTabPermissionGranter() { | 2651 BrowserView::GetActiveTabPermissionGranter() { |
| 2647 content::WebContents* web_contents = GetActiveWebContents(); | 2652 content::WebContents* web_contents = GetActiveWebContents(); |
| 2648 if (!web_contents) | 2653 if (!web_contents) |
| 2649 return nullptr; | 2654 return nullptr; |
| 2650 return extensions::TabHelper::FromWebContents(web_contents) | 2655 return extensions::TabHelper::FromWebContents(web_contents) |
| 2651 ->active_tab_permission_granter(); | 2656 ->active_tab_permission_granter(); |
| 2652 } | 2657 } |
| OLD | NEW |