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

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

Issue 10631010: Change style of ConstrainedWindowViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra "private" Created 8 years, 5 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/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 f73a9d0cf18b45f76b1ec7c5073f8456ed4dee8b..99cf0227cd89ae75764e5932cb4f87ed4444c81d 100644
--- a/chrome/browser/ui/views/constrained_window_views.cc
+++ b/chrome/browser/ui/views/constrained_window_views.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/command_line.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/profiles/profile.h"
@@ -13,8 +14,10 @@
#include "chrome/browser/ui/constrained_window_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
+#include "chrome/browser/ui/views/constrained_window_frame_simple.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
@@ -50,7 +53,6 @@
#include "ash/shell.h"
#include "ash/wm/custom_frame_view_ash.h"
#include "ash/wm/visibility_controller.h"
-#include "base/command_line.h"
#include "ui/aura/window.h"
#endif
@@ -632,15 +634,19 @@ gfx::NativeWindow ConstrainedWindowViews::GetNativeWindow() {
// ConstrainedWindowViews, views::Widget overrides:
views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() {
-#if defined(USE_ASH)
CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(ash::switches::kAuraGoogleDialogFrames))
- return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
- ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh;
- frame->Init(this);
- return frame;
+ if (command_line->HasSwitch(switches::kEnableFramelessConstrainedDialogs)) {
+ return new ConstrainedWindowFrameSimple(this);
+ } else {
+#if defined(USE_ASH)
+ if (command_line->HasSwitch(ash::switches::kAuraGoogleDialogFrames))
+ return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
+ ConstrainedWindowFrameViewAsh* frame = new ConstrainedWindowFrameViewAsh;
+ frame->Init(this);
+ return frame;
#endif
- return new ConstrainedWindowFrameView(this);
+ return new ConstrainedWindowFrameView(this);
+ }
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/ui/views/constrained_window_frame_simple.cc ('k') | chrome/browser/ui/views/web_intent_picker_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698