 Chromium Code Reviews
 Chromium Code Reviews Issue 12298022:
  Don't store the DateTimePicker client in a scoped_ptr.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 12298022:
  Don't store the DateTimePicker client in a scoped_ptr.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| OLD | NEW | 
|---|---|
| 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" | 
| 6 | 6 | 
| 7 #include <algorithm> | 7 #include <algorithm> | 
| 8 #include <cmath> | 8 #include <cmath> | 
| 9 | 9 | 
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" | 
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 638 renderer_accessibility_(NULL), | 638 renderer_accessibility_(NULL), | 
| 639 java_bridge_dispatcher_(NULL), | 639 java_bridge_dispatcher_(NULL), | 
| 640 mouse_lock_dispatcher_(NULL), | 640 mouse_lock_dispatcher_(NULL), | 
| 641 favicon_helper_(NULL), | 641 favicon_helper_(NULL), | 
| 642 #if defined(OS_ANDROID) | 642 #if defined(OS_ANDROID) | 
| 643 body_background_color_(SK_ColorWHITE), | 643 body_background_color_(SK_ColorWHITE), | 
| 644 update_frame_info_scheduled_(false), | 644 update_frame_info_scheduled_(false), | 
| 645 expected_content_intent_id_(0), | 645 expected_content_intent_id_(0), | 
| 646 media_player_proxy_(NULL), | 646 media_player_proxy_(NULL), | 
| 647 synchronous_find_active_match_ordinal_(-1), | 647 synchronous_find_active_match_ordinal_(-1), | 
| 648 date_time_picker_client_(NULL), | |
| 648 ALLOW_THIS_IN_INITIALIZER_LIST( | 649 ALLOW_THIS_IN_INITIALIZER_LIST( | 
| 649 load_progress_tracker_(new LoadProgressTracker(this))), | 650 load_progress_tracker_(new LoadProgressTracker(this))), | 
| 650 #endif | 651 #endif | 
| 651 session_storage_namespace_id_(params->session_storage_namespace_id), | 652 session_storage_namespace_id_(params->session_storage_namespace_id), | 
| 652 handling_select_range_(false), | 653 handling_select_range_(false), | 
| 653 next_snapshot_id_(0), | 654 next_snapshot_id_(0), | 
| 654 #if defined(OS_WIN) | 655 #if defined(OS_WIN) | 
| 655 focused_plugin_id_(-1), | 656 focused_plugin_id_(-1), | 
| 656 #endif | 657 #endif | 
| 657 updating_frame_tree_(false), | 658 updating_frame_tree_(false), | 
| (...skipping 5809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6467 // Remove the content highlighting if any. | 6468 // Remove the content highlighting if any. | 
| 6468 scheduleComposite(); | 6469 scheduleComposite(); | 
| 6469 | 6470 | 
| 6470 if (!intent.is_empty()) | 6471 if (!intent.is_empty()) | 
| 6471 Send(new ViewHostMsg_StartContentIntent(routing_id_, intent)); | 6472 Send(new ViewHostMsg_StartContentIntent(routing_id_, intent)); | 
| 6472 } | 6473 } | 
| 6473 | 6474 | 
| 6474 bool RenderViewImpl::openDateTimeChooser( | 6475 bool RenderViewImpl::openDateTimeChooser( | 
| 6475 const WebKit::WebDateTimeChooserParams& params, | 6476 const WebKit::WebDateTimeChooserParams& params, | 
| 6476 WebKit::WebDateTimeChooserCompletion* completion) { | 6477 WebKit::WebDateTimeChooserCompletion* completion) { | 
| 6477 date_time_picker_client_.reset( | 6478 if (date_time_picker_client_ != NULL) | 
| 
Miguel Garcia
2013/02/18 17:48:48
(I introduced the original bug so thanks a lot for
 | |
| 6478 new RendererDateTimePicker(this, params, completion)); | 6479 delete date_time_picker_client_; | 
| 6480 | |
| 6481 date_time_picker_client_ = new RendererDateTimePicker(this, params, | |
| 6482 completion); | |
| 6479 return date_time_picker_client_->Open(); | 6483 return date_time_picker_client_->Open(); | 
| 6480 } | 6484 } | 
| 6481 | 6485 | 
| 6482 #endif // defined(OS_ANDROID) | 6486 #endif // defined(OS_ANDROID) | 
| 6483 | 6487 | 
| 6484 void RenderViewImpl::OnAsyncFileOpened( | 6488 void RenderViewImpl::OnAsyncFileOpened( | 
| 6485 base::PlatformFileError error_code, | 6489 base::PlatformFileError error_code, | 
| 6486 IPC::PlatformFileForTransit file_for_transit, | 6490 IPC::PlatformFileForTransit file_for_transit, | 
| 6487 int message_id) { | 6491 int message_id) { | 
| 6488 pepper_helper_->OnAsyncFileOpened( | 6492 pepper_helper_->OnAsyncFileOpened( | 
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6662 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6666 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 
| 6663 RenderProcess::current()->ReleaseTransportDIB(dib); | 6667 RenderProcess::current()->ReleaseTransportDIB(dib); | 
| 6664 } | 6668 } | 
| 6665 | 6669 | 
| 6666 void RenderViewImpl::DidCommitCompositorFrame() { | 6670 void RenderViewImpl::DidCommitCompositorFrame() { | 
| 6667 RenderWidget::DidCommitCompositorFrame(); | 6671 RenderWidget::DidCommitCompositorFrame(); | 
| 6668 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 6672 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidCommitCompositorFrame()); | 
| 6669 } | 6673 } | 
| 6670 | 6674 | 
| 6671 } // namespace content | 6675 } // namespace content | 
| OLD | NEW |