Commit 20ff1bcf authored by tapted@chromium.org's avatar tapted@chromium.org

MacViews: Fix BrowserClient for toolkit-views on Mac

wm::WMState isn't available or required on Mac.

This guards the wm::WMState in ChromeBrowserMainExtraPartsViews with an
#if defined(USE_AURA).

BUG=390755

Review URL: https://codereview.chromium.org/400543002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284325 0039d316-1c4b-4281-b951-d872f2087c98
parent c338808f
......@@ -4,11 +4,11 @@
#include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
#include "chrome/browser/chrome_browser_main.h"
#include "chrome/browser/ui/views/chrome_views_delegate.h"
#include "chrome/common/chrome_switches.h"
#include "ui/base/ui_base_switches.h"
#if defined(USE_AURA)
#include "ui/wm/core/wm_state.h"
#endif
ChromeBrowserMainExtraPartsViews::ChromeBrowserMainExtraPartsViews() {
}
......@@ -22,5 +22,7 @@ void ChromeBrowserMainExtraPartsViews::ToolkitInitialized() {
if (!views::ViewsDelegate::views_delegate)
views::ViewsDelegate::views_delegate = new ChromeViewsDelegate;
#if defined(USE_AURA)
wm_state_.reset(new wm::WMState);
#endif
}
......@@ -5,14 +5,15 @@
#ifndef CHROME_BROWSER_UI_VIEWS_CHROME_BROWSER_MAIN_EXTRA_PARTS_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_CHROME_BROWSER_MAIN_EXTRA_PARTS_VIEWS_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/chrome_browser_main_extra_parts.h"
#if defined(USE_AURA)
namespace wm {
class WMState;
}
#endif
class ChromeBrowserMainExtraPartsViews : public ChromeBrowserMainExtraParts {
public:
......@@ -23,7 +24,9 @@ class ChromeBrowserMainExtraPartsViews : public ChromeBrowserMainExtraParts {
virtual void ToolkitInitialized() OVERRIDE;
private:
#if defined(USE_AURA)
scoped_ptr<wm::WMState> wm_state_;
#endif
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsViews);
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment