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

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

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. Created 4 years, 8 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 m_chooser->endChooser(); 73 m_chooser->endChooser();
74 } 74 }
75 75
76 AXObject* ColorChooserUIController::rootAXObject() 76 AXObject* ColorChooserUIController::rootAXObject()
77 { 77 {
78 return 0; 78 return 0;
79 } 79 }
80 80
81 void ColorChooserUIController::didChooseColor(const WebColor& color) 81 void ColorChooserUIController::didChooseColor(const WebColor& color)
82 { 82 {
83 ASSERT(m_client); 83 DCHECK(m_client);
84 m_client->didChooseColor(Color(static_cast<RGBA32>(color))); 84 m_client->didChooseColor(Color(static_cast<RGBA32>(color)));
85 } 85 }
86 86
87 void ColorChooserUIController::didEndChooser() 87 void ColorChooserUIController::didEndChooser()
88 { 88 {
89 m_chooser = nullptr; 89 m_chooser = nullptr;
90 if (m_client) 90 if (m_client)
91 m_client->didEndChooser(); 91 m_client->didEndChooser();
92 } 92 }
93 93
94 void ColorChooserUIController::openColorChooser() 94 void ColorChooserUIController::openColorChooser()
95 { 95 {
96 ASSERT(!m_chooser); 96 DCHECK(!m_chooser);
97 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame); 97 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(m_frame);
98 WebFrameClient* webFrameClient = frame->client(); 98 WebFrameClient* webFrameClient = frame->client();
99 if (!webFrameClient) 99 if (!webFrameClient)
100 return; 100 return;
101 m_chooser = adoptPtr(webFrameClient->createColorChooser( 101 m_chooser = adoptPtr(webFrameClient->createColorChooser(
102 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s uggestions())); 102 this, static_cast<WebColor>(m_client->currentColor().rgb()), m_client->s uggestions()));
103 } 103 }
104 104
105 } // namespace blink 105 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698