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

Side by Side Diff: chrome/browser/ui/views/constrained_window_views.cc

Issue 9114067: Fix ifdef in constrained window... need to fall back to constrainedwindowframeview if not in new ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/constrained_window_views.h" 5 #include "chrome/browser/ui/views/constrained_window_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 29 matching lines...) Expand all
40 #include "ui/views/window/frame_background.h" 40 #include "ui/views/window/frame_background.h"
41 #include "ui/views/window/non_client_view.h" 41 #include "ui/views/window/non_client_view.h"
42 #include "ui/views/window/window_resources.h" 42 #include "ui/views/window/window_resources.h"
43 #include "ui/views/window/window_shape.h" 43 #include "ui/views/window/window_shape.h"
44 44
45 #if defined(OS_WIN) && !defined(USE_AURA) 45 #if defined(OS_WIN) && !defined(USE_AURA)
46 #include "ui/views/widget/native_widget_win.h" 46 #include "ui/views/widget/native_widget_win.h"
47 #endif 47 #endif
48 48
49 #if defined(USE_AURA) 49 #if defined(USE_AURA)
50 #include "base/command_line.h"
51 #include "ash/ash_switches.h"
50 #include "ash/shell.h" 52 #include "ash/shell.h"
51 #endif 53 #endif
52 54
53 using base::TimeDelta; 55 using base::TimeDelta;
54 56
55 namespace views { 57 namespace views {
56 class ClientView; 58 class ClientView;
57 } 59 }
58 60
59 // An enumeration of bitmap resources used by this window. 61 // An enumeration of bitmap resources used by this window.
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 602
601 gfx::NativeWindow ConstrainedWindowViews::GetNativeWindow() { 603 gfx::NativeWindow ConstrainedWindowViews::GetNativeWindow() {
602 return Widget::GetNativeWindow(); 604 return Widget::GetNativeWindow();
603 } 605 }
604 606
605 //////////////////////////////////////////////////////////////////////////////// 607 ////////////////////////////////////////////////////////////////////////////////
606 // ConstrainedWindowViews, views::Widget overrides: 608 // ConstrainedWindowViews, views::Widget overrides:
607 609
608 views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() { 610 views::NonClientFrameView* ConstrainedWindowViews::CreateNonClientFrameView() {
609 #if defined(USE_AURA) 611 #if defined(USE_AURA)
610 return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this); 612 if (CommandLine::ForCurrentProcess()->HasSwitch(
611 #else 613 ash::switches::kAuraGoogleDialogFrames)) {
614 return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(this);
615 }
616 #endif
612 return new ConstrainedWindowFrameView(this); 617 return new ConstrainedWindowFrameView(this);
613 #endif
614 } 618 }
615 619
616 //////////////////////////////////////////////////////////////////////////////// 620 ////////////////////////////////////////////////////////////////////////////////
617 // ConstrainedWindowViews, NativeConstrainedWindowDelegate implementation: 621 // ConstrainedWindowViews, NativeConstrainedWindowDelegate implementation:
618 622
619 void ConstrainedWindowViews::OnNativeConstrainedWindowDestroyed() { 623 void ConstrainedWindowViews::OnNativeConstrainedWindowDestroyed() {
620 wrapper_->constrained_window_tab_helper()->WillClose(this); 624 wrapper_->constrained_window_tab_helper()->WillClose(this);
621 } 625 }
622 626
623 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() { 627 void ConstrainedWindowViews::OnNativeConstrainedWindowMouseActivate() {
624 Activate(); 628 Activate();
625 } 629 }
626 630
627 views::internal::NativeWidgetDelegate* 631 views::internal::NativeWidgetDelegate*
628 ConstrainedWindowViews::AsNativeWidgetDelegate() { 632 ConstrainedWindowViews::AsNativeWidgetDelegate() {
629 return this; 633 return this;
630 } 634 }
OLDNEW
« 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