| Index: ios/chrome/browser/web/print_observer.h
|
| diff --git a/ios/chrome/browser/web/print_observer.h b/ios/chrome/browser/web/print_observer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e47a88d04ca62fb3ed8a70f31a1e5efdf20d8072
|
| --- /dev/null
|
| +++ b/ios/chrome/browser/web/print_observer.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef IOS_CHROME_BROWSER_WEB_PRINT_OBSERVER_H_
|
| +#define IOS_CHROME_BROWSER_WEB_PRINT_OBSERVER_H_
|
| +
|
| +#include "ios/web/public/web_state/web_state_observer.h"
|
| +
|
| +namespace base {
|
| +class DictionaryValue;
|
| +} // namespace base
|
| +
|
| +class GURL;
|
| +
|
| +// Handles print requests from JavaScript window.print.
|
| +class PrintObserver : public web::WebStateObserver {
|
| + public:
|
| + explicit PrintObserver(web::WebState* web_state);
|
| + ~PrintObserver() override;
|
| +
|
| + private:
|
| + // web::WebStateObserver overrides:
|
| + void WebStateDestroyed() override;
|
| +
|
| + // Called when print message is sent by the web page.
|
| + bool OnPrintCommand(const base::DictionaryValue&, const GURL&, bool);
|
| + // Stops handling print requests from the web page.
|
| + void Detach();
|
| +};
|
| +
|
| +#endif // IOS_CHROME_BROWSER_WEB_PRINT_OBSERVER_H_
|
|
|