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

Side by Side Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc

Issue 1340683002: Remove base's implicit_cast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implicitcast: numericstest Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/apps/chrome_native_app_window_views_win.h" 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views_win.h"
6 6
7 #include "apps/ui/views/app_window_frame_view.h" 7 #include "apps/ui/views/app_window_frame_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 HWND ChromeNativeAppWindowViewsWin::GetNativeAppWindowHWND() const { 52 HWND ChromeNativeAppWindowViewsWin::GetNativeAppWindowHWND() const {
53 return views::HWNDForWidget(widget()->GetTopLevelWidget()); 53 return views::HWNDForWidget(widget()->GetTopLevelWidget());
54 } 54 }
55 55
56 bool ChromeNativeAppWindowViewsWin::IsRunningInAsh() { 56 bool ChromeNativeAppWindowViewsWin::IsRunningInAsh() {
57 if (!ash::Shell::HasInstance()) 57 if (!ash::Shell::HasInstance())
58 return false; 58 return false;
59 59
60 views::Widget* widget = 60 views::Widget* widget = GetWidget();
61 implicit_cast<views::WidgetDelegate*>(this)->GetWidget();
62 chrome::HostDesktopType host_desktop_type = 61 chrome::HostDesktopType host_desktop_type =
63 chrome::GetHostDesktopTypeForNativeWindow(widget->GetNativeWindow()); 62 chrome::GetHostDesktopTypeForNativeWindow(widget->GetNativeWindow());
64 return host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH; 63 return host_desktop_type == chrome::HOST_DESKTOP_TYPE_ASH;
65 } 64 }
66 65
67 void ChromeNativeAppWindowViewsWin::EnsureCaptionStyleSet() { 66 void ChromeNativeAppWindowViewsWin::EnsureCaptionStyleSet() {
68 // Windows seems to have issues maximizing windows without WS_CAPTION. 67 // Windows seems to have issues maximizing windows without WS_CAPTION.
69 // The default views / Aura implementation will remove this if we are using 68 // The default views / Aura implementation will remove this if we are using
70 // frameless or colored windows, so we put it back here. 69 // frameless or colored windows, so we put it back here.
71 HWND hwnd = GetNativeAppWindowHWND(); 70 HWND hwnd = GetNativeAppWindowHWND();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 ActivateParentDesktopIfNecessary(); 158 ActivateParentDesktopIfNecessary();
160 ChromeNativeAppWindowViewsAura::Activate(); 159 ChromeNativeAppWindowViewsAura::Activate();
161 } 160 }
162 161
163 bool ChromeNativeAppWindowViewsWin::CanMinimize() const { 162 bool ChromeNativeAppWindowViewsWin::CanMinimize() const {
164 // Resizing on Windows breaks translucency if the window also has shape. 163 // Resizing on Windows breaks translucency if the window also has shape.
165 // See http://crbug.com/417947. 164 // See http://crbug.com/417947.
166 return ChromeNativeAppWindowViewsAura::CanMinimize() && 165 return ChromeNativeAppWindowViewsAura::CanMinimize() &&
167 !(WidgetHasHitTestMask() && is_translucent_); 166 !(WidgetHasHitTestMask() && is_translucent_);
168 } 167 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views_mac.mm ('k') | components/history/core/browser/history_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698