OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_WEB_PRINT_OBSERVER_H_ |
| 6 #define IOS_CHROME_BROWSER_WEB_PRINT_OBSERVER_H_ |
| 7 |
| 8 #include "ios/web/public/web_state/web_state_observer.h" |
| 9 |
| 10 namespace base { |
| 11 class DictionaryValue; |
| 12 } // namespace base |
| 13 |
| 14 class GURL; |
| 15 |
| 16 // Handles print requests from JavaScript window.print. |
| 17 class PrintObserver : public web::WebStateObserver { |
| 18 public: |
| 19 explicit PrintObserver(web::WebState* web_state); |
| 20 ~PrintObserver() override; |
| 21 |
| 22 private: |
| 23 // web::WebStateObserver overrides: |
| 24 void WebStateDestroyed() override; |
| 25 |
| 26 // Called when print message is sent by the web page. |
| 27 bool OnPrintCommand(const base::DictionaryValue&, const GURL&, bool); |
| 28 // Stops handling print requests from the web page. |
| 29 void Detach(); |
| 30 }; |
| 31 |
| 32 #endif // IOS_CHROME_BROWSER_WEB_PRINT_OBSERVER_H_ |
OLD | NEW |