| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" | 9 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h" |
| 10 | 10 |
| 11 #include "content/browser/sensors/sensors_provider.h" | |
| 12 #include "content/common/sensors.h" | |
| 13 | |
| 14 class BrowserFrame; | 11 class BrowserFrame; |
| 15 class BrowserView; | 12 class BrowserView; |
| 16 | 13 |
| 17 class TouchBrowserFrameView | 14 class TouchBrowserFrameView |
| 18 : public OpaqueBrowserFrameView, | 15 : public OpaqueBrowserFrameView { |
| 19 public sensors::Listener { | |
| 20 public: | 16 public: |
| 21 // Internal class name. | 17 // Internal class name. |
| 22 static const char kViewClassName[]; | 18 static const char kViewClassName[]; |
| 23 | 19 |
| 24 // Constructs a non-client view for an BrowserFrame. | 20 // Constructs a non-client view for an BrowserFrame. |
| 25 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); | 21 TouchBrowserFrameView(BrowserFrame* frame, BrowserView* browser_view); |
| 26 virtual ~TouchBrowserFrameView(); | 22 virtual ~TouchBrowserFrameView(); |
| 27 | 23 |
| 28 // sensors::Listener implementation | |
| 29 virtual void OnScreenOrientationChanged( | |
| 30 const sensors::ScreenOrientation& change) OVERRIDE; | |
| 31 | |
| 32 private: | 24 private: |
| 33 // Overridden from views::View | 25 // Overridden from views::View |
| 34 virtual std::string GetClassName() const OVERRIDE; | 26 virtual std::string GetClassName() const OVERRIDE; |
| 35 virtual bool HitTest(const gfx::Point& point) const OVERRIDE; | 27 virtual bool HitTest(const gfx::Point& point) const OVERRIDE; |
| 36 | 28 |
| 37 bool initialized_screen_rotation_; | 29 bool initialized_screen_rotation_; |
| 38 | 30 |
| 39 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView); | 31 DISALLOW_COPY_AND_ASSIGN(TouchBrowserFrameView); |
| 40 }; | 32 }; |
| 41 | 33 |
| 42 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ | 34 #endif // CHROME_BROWSER_UI_TOUCH_FRAME_TOUCH_BROWSER_FRAME_VIEW_H_ |
| OLD | NEW |