Chromium Code Reviews| 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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 385 // Notification message from HTML UI. | 385 // Notification message from HTML UI. |
| 386 virtual void WebUISend(WebContents* web_contents, | 386 virtual void WebUISend(WebContents* web_contents, |
| 387 const GURL& source_url, | 387 const GURL& source_url, |
| 388 const std::string& name, | 388 const std::string& name, |
| 389 const base::ListValue& args) {} | 389 const base::ListValue& args) {} |
| 390 | 390 |
| 391 // Requests to lock the mouse. Once the request is approved or rejected, | 391 // Requests to lock the mouse. Once the request is approved or rejected, |
| 392 // GotResponseToLockMouseRequest() will be called on the requesting tab | 392 // GotResponseToLockMouseRequest() will be called on the requesting tab |
| 393 // contents. | 393 // contents. |
| 394 virtual void RequestToLockMouse(WebContents* web_contents, | 394 virtual void RequestToLockMouse(WebContents* web_contents, |
| 395 bool user_gesture) {} | 395 bool /* user_gesture */, |
|
sky
2012/05/30 22:48:27
Don't comment out parameters like this (the rest o
dmurph
2012/05/31 21:13:49
We tried enums, we considered bitmasks, and we con
| |
| 396 bool /* last_unlocked_by_target */) { | |
| 397 } | |
| 396 | 398 |
| 397 // Notification that the page has lost the mouse lock. | 399 // Notification that the page has lost the mouse lock. |
| 398 virtual void LostMouseLock() {} | 400 virtual void LostMouseLock() {} |
| 399 | 401 |
| 400 protected: | 402 protected: |
| 401 virtual ~WebContentsDelegate(); | 403 virtual ~WebContentsDelegate(); |
| 402 | 404 |
| 403 private: | 405 private: |
| 404 friend class ::WebContentsImpl; | 406 friend class ::WebContentsImpl; |
| 405 | 407 |
| 406 // Called when |this| becomes the WebContentsDelegate for |source|. | 408 // Called when |this| becomes the WebContentsDelegate for |source|. |
| 407 void Attach(WebContents* source); | 409 void Attach(WebContents* source); |
| 408 | 410 |
| 409 // Called when |this| is no longer the WebContentsDelegate for |source|. | 411 // Called when |this| is no longer the WebContentsDelegate for |source|. |
| 410 void Detach(WebContents* source); | 412 void Detach(WebContents* source); |
| 411 | 413 |
| 412 // The WebContents that this is currently a delegate for. | 414 // The WebContents that this is currently a delegate for. |
| 413 std::set<WebContents*> attached_contents_; | 415 std::set<WebContents*> attached_contents_; |
| 414 }; | 416 }; |
| 415 | 417 |
| 416 } // namespace content | 418 } // namespace content |
| 417 | 419 |
| 418 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ | 420 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ |
| OLD | NEW |