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

Unified Diff: chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc

Issue 213743017: Remove title and icon from chrome apps native style title bars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed leak in test Created 6 years, 8 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/apps/chrome_native_app_window_views_win.cc
diff --git a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
index 94cddd453f7fead5a31c65c3c43d36013394df53..77ae86aff7f78b57563195ca31141a2e2ba34782 100644
--- a/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
+++ b/chrome/browser/ui/views/apps/chrome_native_app_window_views_win.cc
@@ -6,6 +6,7 @@
#include "apps/app_window.h"
#include "apps/app_window_registry.h"
+#include "apps/ui/views/app_window_frame_view.h"
#include "ash/shell.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -18,6 +19,8 @@
#include "chrome/browser/metro_utils/metro_chrome_win.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/shell_integration.h"
+#include "chrome/browser/ui/views/apps/app_window_desktop_native_widget_aura_win.h"
+#include "chrome/browser/ui/views/apps/glass_app_window_frame_view_win.h"
#include "chrome/browser/web_applications/web_app.h"
#include "chrome/browser/web_applications/web_app_win.h"
#include "chrome/common/chrome_icon_resources_win.h"
@@ -68,7 +71,8 @@ void CreateIconAndSetRelaunchDetails(
} // namespace
ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin()
- : weak_ptr_factory_(this) {}
+ : weak_ptr_factory_(this), glass_frame_view_(NULL) {
+}
void ChromeNativeAppWindowViewsWin::ActivateParentDesktopIfNecessary() {
if (!ash::Shell::HasInstance())
@@ -140,7 +144,7 @@ void ChromeNativeAppWindowViewsWin::OnBeforeWidgetInit(
if (desktop_type == chrome::HOST_DESKTOP_TYPE_ASH)
init_params->context = ash::Shell::GetPrimaryRootWindow();
else
- init_params->native_widget = new views::DesktopNativeWidgetAura(widget);
+ init_params->native_widget = new AppWindowDesktopNativeWidgetAuraWin(this);
}
void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow(
@@ -168,6 +172,16 @@ void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow(
UpdateShelfMenu();
}
+views::NonClientFrameView*
+ChromeNativeAppWindowViewsWin::CreateStandardDesktopAppFrame() {
+ glass_frame_view_ = NULL;
+ if (ui::win::IsAeroGlassEnabled()) {
+ glass_frame_view_ = new GlassAppWindowFrameViewWin(this, widget());
+ return glass_frame_view_;
+ }
+ return ChromeNativeAppWindowViews::CreateStandardDesktopAppFrame();
+}
+
void ChromeNativeAppWindowViewsWin::Show() {
ActivateParentDesktopIfNecessary();
ChromeNativeAppWindowViews::Show();

Powered by Google App Engine
This is Rietveld 408576698