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

Unified Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 136093007: Widget::ShouldUseNativeFrame is now meaningful on Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/tabs/tab.cc
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index fa9e9d88a2bf886462a3959999e8debd57b0c552..9046efad9035338e22310b4c8fcfb21662805255 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -1608,6 +1608,13 @@ bool Tab::ShouldShowCloseBox() const {
IconCapacity(), data().mini, IsActive());
}
+bool Tab::UsingWindowsGlass(const views::Widget* widget) const {
+#if defined(OS_WIN)
+ return widget && widget->GetTopLevelWidget()->ShouldUseNativeFrame();
+#endif
+return false;
+}
+
double Tab::GetThrobValue() {
bool is_selected = IsSelected();
double min = is_selected ? kSelectedTabOpacity : 0;
@@ -1686,7 +1693,7 @@ gfx::Rect Tab::GetImmersiveBarRect() const {
void Tab::GetTabIdAndFrameId(views::Widget* widget,
int* tab_id,
int* frame_id) const {
- if (widget && widget->GetTopLevelWidget()->ShouldUseNativeFrame()) {
+ if (UsingWindowsGlass(widget)) {
*tab_id = IDR_THEME_TAB_BACKGROUND_V;
*frame_id = 0;
} else if (data().incognito) {

Powered by Google App Engine
This is Rietveld 408576698