| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 } | 267 } |
| 268 return ToWebPluginContainerImpl(WebNode::PluginContainerFromNode(node)); | 268 return ToWebPluginContainerImpl(WebNode::PluginContainerFromNode(node)); |
| 269 } | 269 } |
| 270 | 270 |
| 271 // Simple class to override some of PrintContext behavior. Some of the methods | 271 // Simple class to override some of PrintContext behavior. Some of the methods |
| 272 // made virtual so that they can be overridden by ChromePluginPrintContext. | 272 // made virtual so that they can be overridden by ChromePluginPrintContext. |
| 273 class ChromePrintContext : public PrintContext { | 273 class ChromePrintContext : public PrintContext { |
| 274 WTF_MAKE_NONCOPYABLE(ChromePrintContext); | 274 WTF_MAKE_NONCOPYABLE(ChromePrintContext); |
| 275 | 275 |
| 276 public: | 276 public: |
| 277 ChromePrintContext(LocalFrame* frame) | 277 explicit ChromePrintContext(LocalFrame* frame) |
| 278 : PrintContext(frame), printed_page_width_(0) {} | 278 : PrintContext(frame), printed_page_width_(0) {} |
| 279 | 279 |
| 280 ~ChromePrintContext() override {} | 280 ~ChromePrintContext() override {} |
| 281 | 281 |
| 282 virtual void BeginPrintMode(float width, float height) { | 282 virtual void BeginPrintMode(float width, float height) { |
| 283 DCHECK(!printed_page_width_); | 283 DCHECK(!printed_page_width_); |
| 284 printed_page_width_ = width; | 284 printed_page_width_ = width; |
| 285 printed_page_height_ = height; | 285 printed_page_height_ = height; |
| 286 PrintContext::BeginPrintMode(printed_page_width_, height); | 286 PrintContext::BeginPrintMode(printed_page_width_, height); |
| 287 } | 287 } |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 | 548 |
| 549 void WebLocalFrameImpl::Close() { | 549 void WebLocalFrameImpl::Close() { |
| 550 WebLocalFrame::Close(); | 550 WebLocalFrame::Close(); |
| 551 | 551 |
| 552 client_ = nullptr; | 552 client_ = nullptr; |
| 553 | 553 |
| 554 if (dev_tools_agent_) | 554 if (dev_tools_agent_) |
| 555 dev_tools_agent_.Clear(); | 555 dev_tools_agent_.Clear(); |
| 556 | 556 |
| 557 self_keep_alive_.Clear(); | 557 self_keep_alive_.Clear(); |
| 558 |
| 559 if (print_context_) |
| 560 PrintEnd(); |
| 558 } | 561 } |
| 559 | 562 |
| 560 WebString WebLocalFrameImpl::AssignedName() const { | 563 WebString WebLocalFrameImpl::AssignedName() const { |
| 561 return GetFrame()->Tree().GetName(); | 564 return GetFrame()->Tree().GetName(); |
| 562 } | 565 } |
| 563 | 566 |
| 564 void WebLocalFrameImpl::SetName(const WebString& name) { | 567 void WebLocalFrameImpl::SetName(const WebString& name) { |
| 565 GetFrame()->Tree().SetName(name); | 568 GetFrame()->Tree().SetName(name); |
| 566 } | 569 } |
| 567 | 570 |
| (...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2573 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { | 2576 TextCheckerClient& WebLocalFrameImpl::GetTextCheckerClient() const { |
| 2574 return *text_checker_client_; | 2577 return *text_checker_client_; |
| 2575 } | 2578 } |
| 2576 | 2579 |
| 2577 void WebLocalFrameImpl::SetTextCheckClient( | 2580 void WebLocalFrameImpl::SetTextCheckClient( |
| 2578 WebTextCheckClient* text_check_client) { | 2581 WebTextCheckClient* text_check_client) { |
| 2579 text_check_client_ = text_check_client; | 2582 text_check_client_ = text_check_client; |
| 2580 } | 2583 } |
| 2581 | 2584 |
| 2582 } // namespace blink | 2585 } // namespace blink |
| OLD | NEW |