Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 #include "core/page/PagePopupClient.h" | 29 #include "core/page/PagePopupClient.h" |
| 30 #include "web/ColorChooserUIController.h" | 30 #include "web/ColorChooserUIController.h" |
| 31 #include "wtf/OwnPtr.h" | 31 #include "wtf/OwnPtr.h" |
| 32 | 32 |
| 33 namespace blink { | 33 namespace blink { |
| 34 | 34 |
| 35 class ChromeClientImpl; | 35 class ChromeClientImpl; |
| 36 class ColorChooserClient; | 36 class ColorChooserClient; |
| 37 class PagePopup; | 37 class PagePopup; |
| 38 | 38 |
| 39 class ColorChooserPopupUIController FINAL : public ColorChooserUIController, pub lic PagePopupClient { | 39 class ColorChooserPopupUIController final : public ColorChooserUIController, pub lic PagePopupClient { |
| 40 | 40 |
| 41 public: | 41 public: |
| 42 ColorChooserPopupUIController(LocalFrame*, ChromeClientImpl*, ColorChooserCl ient*); | 42 static PassOwnPtrWillBeRawPtr<ColorChooserPopupUIController> create(LocalFra me* frame, ChromeClientImpl* chromeClient, ColorChooserClient* client) |
| 43 { | |
| 44 return adoptPtrWillBeNoop(new ColorChooserPopupUIController(frame, chrom eClient, client)); | |
| 45 } | |
| 46 | |
| 43 virtual ~ColorChooserPopupUIController(); | 47 virtual ~ColorChooserPopupUIController(); |
| 48 virtual void trace(Visitor*) override; | |
| 44 | 49 |
| 45 // ColorChooserUIController functions: | 50 // ColorChooserUIController functions: |
| 46 virtual void openUI() OVERRIDE; | 51 virtual void openUI() override; |
| 47 | 52 |
| 48 // ColorChooser functions | 53 // ColorChooser functions |
| 49 virtual void endChooser() OVERRIDE; | 54 virtual void endChooser() override; |
| 50 virtual AXObject* rootAXObject() OVERRIDE; | 55 virtual AXObject* rootAXObject() override; |
| 51 | 56 |
| 52 // PagePopupClient functions: | 57 // PagePopupClient functions: |
| 53 virtual IntSize contentSize() OVERRIDE; | 58 virtual IntSize contentSize() override; |
| 54 virtual void writeDocument(SharedBuffer*) OVERRIDE; | 59 virtual void writeDocument(SharedBuffer*) override; |
| 55 virtual Locale& locale() OVERRIDE; | 60 virtual Locale& locale() override; |
| 56 virtual void setValueAndClosePopup(int, const String&) OVERRIDE; | 61 virtual void setValueAndClosePopup(int, const String&) override; |
| 57 virtual void setValue(const String&) OVERRIDE; | 62 virtual void setValue(const String&) override; |
| 58 virtual void closePopup() OVERRIDE; | 63 virtual void closePopup() override; |
| 59 virtual Element& ownerElement() OVERRIDE; | 64 virtual Element& ownerElement() override; |
| 60 virtual void didClosePopup() OVERRIDE; | 65 virtual void didClosePopup() override; |
|
Mike West
2014/10/06 18:45:32
C++11!1!!!1!
sof
2014/10/06 19:19:29
I know there are renaming CLs coming down the chut
Mike West
2014/10/06 19:29:29
I agree. You should feel free to clean up as you g
tkent
2014/10/07 02:25:00
FYI. Our new rule is to remove |virtual| if a fun
| |
| 61 | 66 |
| 62 private: | 67 private: |
| 68 ColorChooserPopupUIController(LocalFrame*, ChromeClientImpl*, ColorChooserCl ient*); | |
| 69 | |
| 63 void openPopup(); | 70 void openPopup(); |
| 64 | 71 |
| 65 ChromeClientImpl* m_chromeClient; | 72 ChromeClientImpl* m_chromeClient; |
| 66 ColorChooserClient* m_client; | 73 RawPtrWillBeMember<ColorChooserClient> m_client; |
| 67 PagePopup* m_popup; | 74 PagePopup* m_popup; |
|
haraken
2014/10/07 03:31:29
This raw pointer looks safe since it's cleared in
| |
| 68 Locale& m_locale; | 75 Locale& m_locale; |
| 69 }; | 76 }; |
| 70 | 77 |
| 71 } | 78 } // namespace blink |
| 72 | 79 |
| 73 #endif // ColorChooserPopupUIController_h | 80 #endif // ColorChooserPopupUIController_h |
| OLD | NEW |