Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: Source/web/ColorChooserUIController.cpp

Issue 631833002: Move color chooser objects to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 27 matching lines...) Expand all
38 38
39 39
40 ColorChooserUIController::ColorChooserUIController(LocalFrame* frame, ColorChoos erClient* client) 40 ColorChooserUIController::ColorChooserUIController(LocalFrame* frame, ColorChoos erClient* client)
41 : m_frame(frame) 41 : m_frame(frame)
42 , m_client(client) 42 , m_client(client)
43 { 43 {
44 } 44 }
45 45
46 ColorChooserUIController::~ColorChooserUIController() 46 ColorChooserUIController::~ColorChooserUIController()
47 { 47 {
48 endChooser();
49 }
50
51 void ColorChooserUIController::trace(Visitor* visitor)
52 {
53 visitor->trace(m_frame);
54 visitor->trace(m_client);
55 ColorChooser::trace(visitor);
48 } 56 }
49 57
50 void ColorChooserUIController::openUI() 58 void ColorChooserUIController::openUI()
51 { 59 {
52 openColorChooser(); 60 openColorChooser();
53 } 61 }
54 62
55 void ColorChooserUIController::setSelectedColor(const Color& color) 63 void ColorChooserUIController::setSelectedColor(const Color& color)
56 { 64 {
57 ASSERT(m_chooser); 65 ASSERT(m_chooser);
(...skipping 29 matching lines...) Expand all
87 ASSERT(!m_chooser); 95 ASSERT(!m_chooser);
88 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame); 96 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame);
89 WebFrameClient* webFrameClient = frame->client(); 97 WebFrameClient* webFrameClient = frame->client();
90 if (!webFrameClient) 98 if (!webFrameClient)
91 return; 99 return;
92 m_chooser = adoptPtr(webFrameClient->createColorChooser( 100 m_chooser = adoptPtr(webFrameClient->createColorChooser(
93 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s uggestions())); 101 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s uggestions()));
94 } 102 }
95 103
96 } // namespace blink 104 } // namespace blink
OLDNEW
« Source/web/ColorChooserPopupUIController.cpp ('K') | « Source/web/ColorChooserUIController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698