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

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: rebase 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
« no previous file with comments | « Source/WebKit/chromium/src/WebPagePopupImpl.h ('k') | Source/WebKit/chromium/src/WebViewImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 { 59 class PagePopupChromeClient : public EmptyChromeClient {
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 332
335 // m_widgetClient might be 0 because this widget might be already closed. 333 // m_widgetClient might be 0 because this widget might be already closed.
336 if (m_widgetClient) { 334 if (m_widgetClient) {
337 // closeWidgetSoon() will call this->close() later. 335 // closeWidgetSoon() will call this->close() later.
338 m_widgetClient->closeWidgetSoon(); 336 m_widgetClient->closeWidgetSoon();
339 } 337 }
340 338
341 m_popupClient->didClosePopup(); 339 m_popupClient->didClosePopup();
342 } 340 }
343 341
344 #endif // ENABLE(PAGE_POPUP)
345
346 // WebPagePopup ---------------------------------------------------------------- 342 // WebPagePopup ----------------------------------------------------------------
347 343
348 WebPagePopup* WebPagePopup::create(WebWidgetClient* client) 344 WebPagePopup* WebPagePopup::create(WebWidgetClient* client)
349 { 345 {
350 #if ENABLE(PAGE_POPUP)
351 if (!client) 346 if (!client)
352 CRASH(); 347 CRASH();
353 // A WebPagePopupImpl instance usually has two references. 348 // A WebPagePopupImpl instance usually has two references.
354 // - One owned by the instance itself. It represents the visible widget. 349 // - One owned by the instance itself. It represents the visible widget.
355 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the 350 // - One owned by a WebViewImpl. It's released when the WebViewImpl ask the
356 // WebPagePopupImpl to close. 351 // WebPagePopupImpl to close.
357 // We need them because the closing operation is asynchronous and the widget 352 // We need them because the closing operation is asynchronous and the widget
358 // can be closed while the WebViewImpl is unaware of it. 353 // can be closed while the WebViewImpl is unaware of it.
359 return adoptRef(new WebPagePopupImpl(client)).leakRef(); 354 return adoptRef(new WebPagePopupImpl(client)).leakRef();
360 #else
361 UNUSED_PARAM(client);
362 return 0;
363 #endif
364 } 355 }
365 356
366 } // namespace WebKit 357 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebPagePopupImpl.h ('k') | Source/WebKit/chromium/src/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698