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

Unified Diff: chrome/browser/ui/views/constrained_window_views.cc

Issue 12095005: Use DialogFrameView for ConstrainedWindowViews with --enable-new-dialog-style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/constrained_window_views.cc
diff --git a/chrome/browser/ui/views/constrained_window_views.cc b/chrome/browser/ui/views/constrained_window_views.cc
index fbbe8f16f7a8712458470506914de71f841d8579..120e194fc5938311baf68e2c0a176aa15378b17c 100644
--- a/chrome/browser/ui/views/constrained_window_views.cc
+++ b/chrome/browser/ui/views/constrained_window_views.cc
@@ -41,6 +41,7 @@
#include "ui/views/window/client_view.h"
#include "ui/views/window/dialog_client_view.h"
#include "ui/views/window/dialog_delegate.h"
+#include "ui/views/window/dialog_frame_view.h"
#include "ui/views/window/frame_background.h"
#include "ui/views/window/non_client_view.h"
#include "ui/views/window/window_resources.h"
@@ -633,10 +634,9 @@ gfx::NativeWindow ConstrainedWindowViews::GetNativeWindow() {
}
views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() {
+ if (views::DialogDelegate::UseNewStyle())
+ return new views::DialogFrameView(widget_delegate()->GetWindowTitle());
#if defined(USE_ASH)
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kEnableNewDialogStyle))
- return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh;
frame->Init(this);
return frame;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698