Chromium Code Reviews| Index: Source/modules/presentation/PresentationController.h |
| diff --git a/Source/modules/presentation/PresentationController.h b/Source/modules/presentation/PresentationController.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0464bb5decf5873e7b4c100b57ca6cae597ccfcf |
| --- /dev/null |
| +++ b/Source/modules/presentation/PresentationController.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2015 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 PresentationController_h |
| +#define PresentationController_h |
| + |
| +#include "modules/presentation/Presentation.h" |
| +#include "platform/Supplementable.h" |
| +#include "platform/heap/Handle.h" |
| +#include "public/platform/WebPresentationController.h" |
| + |
| +namespace blink { |
| + |
| +class LocalFrame; |
| +class WebPresentationClient; |
| + |
| +// The coordinator between the various page exposed properties and the content |
| +// layer represented via |WebPresentationClient|. |
| +class PresentationController final : public NoBaseWillBeGarbageCollectedFinalized<PresentationController>, public WillBeHeapSupplement<LocalFrame>, public WebPresentationController { |
|
mark a. foltz
2015/01/09 00:35:10
Is there a line length limit in the Blink style gu
whywhat
2015/01/22 21:18:17
Nope, there's no limit. :( As I understand it, the
|
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PresentationController); |
| + WTF_MAKE_NONCOPYABLE(PresentationController); |
| +public: |
| + virtual ~PresentationController(); |
| + |
| + static PassOwnPtrWillBeRawPtr<PresentationController> create(LocalFrame&, WebPresentationClient*); |
| + |
| + static const char* supplementName(); |
| + static PresentationController* from(LocalFrame&); |
| + |
| + static void provideTo(LocalFrame&, WebPresentationClient*); |
| + |
| + // Implementation of HeapSupplement. |
| + virtual void trace(Visitor*) override; |
|
mark a. foltz
2015/01/09 00:35:10
Named parameter?
whywhat
2015/01/22 21:18:17
Per Blink/WebKit style guide the name that's obvio
|
| + |
| + // Implementation of WebPresentationController. |
| + virtual void didChangeAvailability(bool available) override; |
| + |
| + // Called when the first listener was added to or the last listener was removed from the |
| + // |availablechange| event. |
| + void updateAvailableChangeWatched(bool watched); |
| + |
| + // Connects the |Presentation| object with this controller. |
| + void setPresentation(Presentation*); |
|
mark a. foltz
2015/01/09 00:35:10
Does this need a named parameter?
whywhat
2015/01/22 21:18:17
Ditto.
|
| + |
| +private: |
| + PresentationController(LocalFrame&, WebPresentationClient*); |
| + |
| + WebPresentationClient* m_client; |
| + PersistentWillBeMember<Presentation> m_presentation; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // PresentationController_h |