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 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2121 contents_web_view_->SetEmbedFullscreenWidgetMode(true); | 2121 contents_web_view_->SetEmbedFullscreenWidgetMode(true); |
2122 | 2122 |
2123 web_contents_close_handler_.reset( | 2123 web_contents_close_handler_.reset( |
2124 new WebContentsCloseHandler(contents_web_view_)); | 2124 new WebContentsCloseHandler(contents_web_view_)); |
2125 | 2125 |
2126 devtools_web_view_ = new views::WebView(browser_->profile()); | 2126 devtools_web_view_ = new views::WebView(browser_->profile()); |
2127 devtools_web_view_->set_id(VIEW_ID_DEV_TOOLS_DOCKED); | 2127 devtools_web_view_->set_id(VIEW_ID_DEV_TOOLS_DOCKED); |
2128 devtools_web_view_->SetVisible(false); | 2128 devtools_web_view_->SetVisible(false); |
2129 | 2129 |
2130 contents_container_ = new views::View(); | 2130 contents_container_ = new views::View(); |
2131 // FIXME: Clear alpha only upon a call to | |
2132 // content::RenderWidgetHostView->SetBackgroundColor(SK_ColorTRANSPARENT). | |
2131 contents_container_->set_background(views::Background::CreateSolidBackground( | 2133 contents_container_->set_background(views::Background::CreateSolidBackground( |
2132 GetThemeProvider()->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND))); | 2134 GetThemeProvider()->GetColor(ThemeProperties::COLOR_CONTROL_BACKGROUND) & |
2135 0x00FFFFFF)); | |
trchen
2016/02/25 02:30:12
What does this mean? Is it pre-multiplied alpha or
Julien Isorce Samsung
2016/02/25 11:33:55
Sorry for the confusion, this code has no intentio
| |
2136 | |
2133 contents_container_->AddChildView(devtools_web_view_); | 2137 contents_container_->AddChildView(devtools_web_view_); |
2134 contents_container_->AddChildView(contents_web_view_); | 2138 contents_container_->AddChildView(contents_web_view_); |
2135 contents_container_->SetLayoutManager(new ContentsLayoutManager( | 2139 contents_container_->SetLayoutManager(new ContentsLayoutManager( |
2136 devtools_web_view_, contents_web_view_)); | 2140 devtools_web_view_, contents_web_view_)); |
2137 AddChildView(contents_container_); | 2141 AddChildView(contents_container_); |
2138 set_contents_view(contents_container_); | 2142 set_contents_view(contents_container_); |
2139 | 2143 |
2140 // Top container holds tab strip and toolbar and lives at the front of the | 2144 // Top container holds tab strip and toolbar and lives at the front of the |
2141 // view hierarchy. | 2145 // view hierarchy. |
2142 top_container_ = new TopContainerView(this); | 2146 top_container_ = new TopContainerView(this); |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2731 } | 2735 } |
2732 | 2736 |
2733 extensions::ActiveTabPermissionGranter* | 2737 extensions::ActiveTabPermissionGranter* |
2734 BrowserView::GetActiveTabPermissionGranter() { | 2738 BrowserView::GetActiveTabPermissionGranter() { |
2735 content::WebContents* web_contents = GetActiveWebContents(); | 2739 content::WebContents* web_contents = GetActiveWebContents(); |
2736 if (!web_contents) | 2740 if (!web_contents) |
2737 return nullptr; | 2741 return nullptr; |
2738 return extensions::TabHelper::FromWebContents(web_contents) | 2742 return extensions::TabHelper::FromWebContents(web_contents) |
2739 ->active_tab_permission_granter(); | 2743 ->active_tab_permission_granter(); |
2740 } | 2744 } |
OLD | NEW |