| 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 #ifndef CHROME_BROWSER_THREE_D_API_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_THREE_D_API_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_THREE_D_API_OBSERVER_H_ | 6 #define CHROME_BROWSER_THREE_D_API_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/web_contents_observer.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "content/public/browser/web_contents_user_data.h" | 9 #include "content/public/browser/gpu_data_manager_observer.h" |
| 10 | 10 |
| 11 class ThreeDAPIObserver | 11 class ThreeDAPIObserver |
| 12 : public content::WebContentsObserver, | 12 : public content::GpuDataManagerObserver { |
| 13 public content::WebContentsUserData<ThreeDAPIObserver> { | |
| 14 public: | 13 public: |
| 14 ThreeDAPIObserver(); |
| 15 virtual ~ThreeDAPIObserver(); | 15 virtual ~ThreeDAPIObserver(); |
| 16 | 16 |
| 17 private: | 17 private: |
| 18 explicit ThreeDAPIObserver(content::WebContents* web_contents); | |
| 19 friend class content::WebContentsUserData<ThreeDAPIObserver>; | |
| 20 | |
| 21 virtual void DidBlock3DAPIs(const GURL& url, | 18 virtual void DidBlock3DAPIs(const GURL& url, |
| 19 int render_process_id, |
| 20 int render_view_id, |
| 22 content::ThreeDAPIType requester) OVERRIDE; | 21 content::ThreeDAPIType requester) OVERRIDE; |
| 23 | 22 |
| 24 DISALLOW_COPY_AND_ASSIGN(ThreeDAPIObserver); | 23 DISALLOW_COPY_AND_ASSIGN(ThreeDAPIObserver); |
| 25 }; | 24 }; |
| 26 | 25 |
| 27 #endif // CHROME_BROWSER_THREE_D_API_OBSERVER_H_ | 26 #endif // CHROME_BROWSER_THREE_D_API_OBSERVER_H_ |
| OLD | NEW |