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

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 11378008: Raise an infobar and deny access to WebGL if a GPU reset was detected while a web page containing W… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work around build failure on Mac OS with 10.6 SDK. Created 8 years, 1 month 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 | « content/public/browser/gpu_data_manager.h ('k') | content/public/common/three_d_api_types.h » ('j') | 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) 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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
12 #include "content/public/common/page_transition_types.h" 12 #include "content/public/common/page_transition_types.h"
13 #include "content/public/common/three_d_api_types.h"
13 #include "ipc/ipc_listener.h" 14 #include "ipc/ipc_listener.h"
14 #include "ipc/ipc_sender.h" 15 #include "ipc/ipc_sender.h"
15 #include "webkit/glue/window_open_disposition.h" 16 #include "webkit/glue/window_open_disposition.h"
16 17
17 namespace content { 18 namespace content {
18 19
19 class RenderViewHost; 20 class RenderViewHost;
20 class WebContents; 21 class WebContents;
21 class WebContentsImpl; 22 class WebContentsImpl;
22 struct FrameNavigateParams; 23 struct FrameNavigateParams;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // with the result. Otherwise it should return false, in which case the next 143 // with the result. Otherwise it should return false, in which case the next
143 // observer will be called. 144 // observer will be called.
144 // Implementations should make sure not to call the callback after the 145 // Implementations should make sure not to call the callback after the
145 // WebContents has been destroyed. 146 // WebContents has been destroyed.
146 virtual bool RequestPpapiBrokerPermission( 147 virtual bool RequestPpapiBrokerPermission(
147 WebContents* web_contents, 148 WebContents* web_contents,
148 const GURL& url, 149 const GURL& url,
149 const FilePath& plugin_path, 150 const FilePath& plugin_path,
150 const base::Callback<void(bool)>& callback); 151 const base::Callback<void(bool)>& callback);
151 152
153 // Indicates that client 3D APIs (Pepper 3D, WebGL) were just
154 // blocked on the current page, specifically because the GPU was
155 // reset recently.
156 virtual void DidBlock3DAPIs(const GURL& url,
157 ThreeDAPIType requester) {}
158
152 // IPC::Listener implementation. 159 // IPC::Listener implementation.
153 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 160 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
154 161
155 // IPC::Sender implementation. 162 // IPC::Sender implementation.
156 virtual bool Send(IPC::Message* message) OVERRIDE; 163 virtual bool Send(IPC::Message* message) OVERRIDE;
157 int routing_id() const; 164 int routing_id() const;
158 165
159 protected: 166 protected:
160 // Use this constructor when the object is tied to a single WebContents for 167 // Use this constructor when the object is tied to a single WebContents for
161 // its entire lifetime. 168 // its entire lifetime.
(...skipping 19 matching lines...) Expand all
181 void WebContentsImplDestroyed(); 188 void WebContentsImplDestroyed();
182 189
183 WebContentsImpl* web_contents_; 190 WebContentsImpl* web_contents_;
184 191
185 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 192 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
186 }; 193 };
187 194
188 } // namespace content 195 } // namespace content
189 196
190 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 197 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/public/browser/gpu_data_manager.h ('k') | content/public/common/three_d_api_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698