| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_browser_main_extra_parts_views.h" | 5 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_browser_main.h" | |
| 8 #include "chrome/browser/ui/views/chrome_views_delegate.h" | 7 #include "chrome/browser/ui/views/chrome_views_delegate.h" |
| 9 #include "chrome/common/chrome_switches.h" | 8 |
| 10 #include "ui/base/ui_base_switches.h" | 9 #if defined(USE_AURA) |
| 11 #include "ui/wm/core/wm_state.h" | 10 #include "ui/wm/core/wm_state.h" |
| 11 #endif |
| 12 | 12 |
| 13 ChromeBrowserMainExtraPartsViews::ChromeBrowserMainExtraPartsViews() { | 13 ChromeBrowserMainExtraPartsViews::ChromeBrowserMainExtraPartsViews() { |
| 14 } | 14 } |
| 15 | 15 |
| 16 ChromeBrowserMainExtraPartsViews::~ChromeBrowserMainExtraPartsViews() { | 16 ChromeBrowserMainExtraPartsViews::~ChromeBrowserMainExtraPartsViews() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 void ChromeBrowserMainExtraPartsViews::ToolkitInitialized() { | 19 void ChromeBrowserMainExtraPartsViews::ToolkitInitialized() { |
| 20 // The delegate needs to be set before any UI is created so that windows | 20 // The delegate needs to be set before any UI is created so that windows |
| 21 // display the correct icon. | 21 // display the correct icon. |
| 22 if (!views::ViewsDelegate::views_delegate) | 22 if (!views::ViewsDelegate::views_delegate) |
| 23 views::ViewsDelegate::views_delegate = new ChromeViewsDelegate; | 23 views::ViewsDelegate::views_delegate = new ChromeViewsDelegate; |
| 24 | 24 |
| 25 #if defined(USE_AURA) |
| 25 wm_state_.reset(new wm::WMState); | 26 wm_state_.reset(new wm::WMState); |
| 27 #endif |
| 26 } | 28 } |
| OLD | NEW |