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

Side by Side Diff: ui/base/dragdrop/os_exchange_data_provider_aurax11.cc

Issue 666673005: Explicitly coerce PostDispatchAction to uint32_t in DispatchEvent() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ui_enums
Patch Set: sigh. Windows. 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" 5 #include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 const PlatformEvent& event) { 511 const PlatformEvent& event) {
512 return event->xany.window == x_window_; 512 return event->xany.window == x_window_;
513 } 513 }
514 514
515 uint32_t OSExchangeDataProviderAuraX11::DispatchEvent( 515 uint32_t OSExchangeDataProviderAuraX11::DispatchEvent(
516 const PlatformEvent& event) { 516 const PlatformEvent& event) {
517 XEvent* xev = event; 517 XEvent* xev = event;
518 switch (xev->type) { 518 switch (xev->type) {
519 case SelectionRequest: 519 case SelectionRequest:
520 selection_owner_.OnSelectionRequest(*xev); 520 selection_owner_.OnSelectionRequest(*xev);
521 return ui::POST_DISPATCH_STOP_PROPAGATION; 521 return ui::kPostDispatchStopPropagation;
522 default: 522 default:
523 NOTIMPLEMENTED(); 523 NOTIMPLEMENTED();
524 } 524 }
525 return ui::POST_DISPATCH_NONE; 525 return ui::kPostDispatchNone;
526 } 526 }
527 527
528 bool OSExchangeDataProviderAuraX11::GetPlainTextURL(GURL* url) const { 528 bool OSExchangeDataProviderAuraX11::GetPlainTextURL(GURL* url) const {
529 base::string16 text; 529 base::string16 text;
530 if (GetString(&text)) { 530 if (GetString(&text)) {
531 GURL test_url(text); 531 GURL test_url(text);
532 if (test_url.is_valid()) { 532 if (test_url.is_valid()) {
533 *url = test_url; 533 *url = test_url;
534 return true; 534 return true;
535 } 535 }
536 } 536 }
537 537
538 return false; 538 return false;
539 } 539 }
540 540
541 std::vector< ::Atom> OSExchangeDataProviderAuraX11::GetTargets() const { 541 std::vector< ::Atom> OSExchangeDataProviderAuraX11::GetTargets() const {
542 return format_map_.GetTypes(); 542 return format_map_.GetTypes();
543 } 543 }
544 544
545 /////////////////////////////////////////////////////////////////////////////// 545 ///////////////////////////////////////////////////////////////////////////////
546 // OSExchangeData, public: 546 // OSExchangeData, public:
547 547
548 // static 548 // static
549 OSExchangeData::Provider* OSExchangeData::CreateProvider() { 549 OSExchangeData::Provider* OSExchangeData::CreateProvider() {
550 return new OSExchangeDataProviderAuraX11(); 550 return new OSExchangeDataProviderAuraX11();
551 } 551 }
552 552
553 } // namespace ui 553 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698