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

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

Issue 229343004: Revert 262516 "Remove title and icon from chrome apps native style title bars." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 d545ac345c858964d749fbd705e353f520d7da58..2c7ef56f99b2853cec2ce618919597a3e73affff 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,7 +6,6 @@
#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"
@@ -19,8 +18,6 @@
#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"
@@ -33,11 +30,6 @@
#include "ui/base/win/shell.h"
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#include "ui/views/win/hwnd_util.h"
-#include "ui/wm/core/easy_resize_window_targeter.h"
-
-#if defined(USE_ASH)
-#include "chrome/browser/ui/ash/ash_util.h"
-#endif
namespace {
@@ -76,7 +68,7 @@ void CreateIconAndSetRelaunchDetails(
} // namespace
ChromeNativeAppWindowViewsWin::ChromeNativeAppWindowViewsWin()
- : weak_ptr_factory_(this), glass_frame_view_(NULL) {}
+ : weak_ptr_factory_(this) {}
void ChromeNativeAppWindowViewsWin::ActivateParentDesktopIfNecessary() {
if (!ash::Shell::HasInstance())
@@ -148,7 +140,7 @@ void ChromeNativeAppWindowViewsWin::OnBeforeWidgetInit(
if (desktop_type == chrome::HOST_DESKTOP_TYPE_ASH)
init_params->context = ash::Shell::GetPrimaryRootWindow();
else
- init_params->native_widget = new AppWindowDesktopNativeWidgetAuraWin(this);
+ init_params->native_widget = new views::DesktopNativeWidgetAura(widget);
}
void ChromeNativeAppWindowViewsWin::InitializeDefaultWindow(
@@ -176,33 +168,6 @@ 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();
-}
-
-apps::AppWindowFrameView*
-ChromeNativeAppWindowViewsWin::CreateNonStandardAppFrame() {
- apps::AppWindowFrameView* frame =
- ChromeNativeAppWindowViews::CreateNonStandardAppFrame();
-
- if (!chrome::IsNativeWindowInAsh(widget()->GetNativeWindow())) {
- aura::Window* root_window = widget()->GetNativeWindow()->GetRootWindow();
- int resize_inside = frame->resize_inside_bounds_size();
- gfx::Insets inset(
- resize_inside, resize_inside, resize_inside, resize_inside);
- root_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
- new wm::EasyResizeWindowTargeter(root_window, inset, inset)));
- }
-
- return frame;
-}
-
void ChromeNativeAppWindowViewsWin::Show() {
ActivateParentDesktopIfNecessary();
ChromeNativeAppWindowViews::Show();

Powered by Google App Engine
This is Rietveld 408576698