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

Side by Side Diff: Source/WebKit/chromium/src/WebPagePopupImpl.cpp

Issue 14735003: Remove compile time flag ENABLE_PAGE_POPUP . This is part of an overall effort to remove unneeded c… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "core/page/FrameView.h" 49 #include "core/page/FrameView.h"
50 #include "core/page/Page.h" 50 #include "core/page/Page.h"
51 #include "core/page/PagePopupClient.h" 51 #include "core/page/PagePopupClient.h"
52 #include "core/page/Settings.h" 52 #include "core/page/Settings.h"
53 53
54 using namespace WebCore; 54 using namespace WebCore;
55 using namespace std; 55 using namespace std;
56 56
57 namespace WebKit { 57 namespace WebKit {
58 58
59 #if ENABLE(PAGE_POPUP)
60
61 class PagePopupChromeClient : public EmptyChromeClient, public WebCore::PageClie ntChromium { 59 class PagePopupChromeClient : public EmptyChromeClient, public WebCore::PageClie ntChromium {
62 WTF_MAKE_NONCOPYABLE(PagePopupChromeClient); 60 WTF_MAKE_NONCOPYABLE(PagePopupChromeClient);
63 WTF_MAKE_FAST_ALLOCATED; 61 WTF_MAKE_FAST_ALLOCATED;
64 62
65 public: 63 public:
66 explicit PagePopupChromeClient(WebPagePopupImpl* popup) 64 explicit PagePopupChromeClient(WebPagePopupImpl* popup)
67 : m_popup(popup) 65 : m_popup(popup)
68 { 66 {
69 ASSERT(m_popup->widgetClient()); 67 ASSERT(m_popup->widgetClient());
70 } 68 }
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 338
341 // m_widgetClient might be 0 because this widget might be already closed. 339 // m_widgetClient might be 0 because this widget might be already closed.
342 if (m_widgetClient) { 340 if (m_widgetClient) {
343 // closeWidgetSoon() will call this->close() later. 341 // closeWidgetSoon() will call this->close() later.
344 m_widgetClient->closeWidgetSoon(); 342 m_widgetClient->closeWidgetSoon();
345 } 343 }
346 344
347 m_popupClient->didClosePopup(); 345 m_popupClient->didClosePopup();
348 } 346 }
349 347
350 #endif // ENABLE(PAGE_POPUP)
351
352 // WebPagePopup ---------------------------------------------------------------- 348 // WebPagePopup ----------------------------------------------------------------
353 349
354 WebPagePopup* WebPagePopup::create(WebWidgetClient* client) 350 WebPagePopup* WebPagePopup::create(WebWidgetClient* client)
355 { 351 {
356 #if ENABLE(PAGE_POPUP)
357 if (!client) 352 if (!client)
358 CRASH(); 353 CRASH();
359 // A WebPagePopupImpl instance usually has two references. 354 // A WebPagePopupImpl instance usually has two references.
360 // - One owned by the instance itself. It represents the visible widget. 355 // - One owned by the instance itself. It represents the visible widget.
361 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 356 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
362 // WebPagePopupImpl to close. 357 // WebPagePopupImpl to close.
363 // We need them because the closing operation is asynchronous and the widget 358 // We need them because the closing operation is asynchronous and the widget
364 // can be closed while the WebViewImpl is unaware of it. 359 // can be closed while the WebViewImpl is unaware of it.
365 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 360 return adoptRef(new WebPagePopupImpl(client)).leakRef();
366 #else
367 UNUSED_PARAM(client);
368 return 0;
369 #endif
370 } 361 }
371 362
372 } // namespace WebKit 363 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698