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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2391883006: Mojo-ify implementation of screen orientation locking/unlocking. (Closed)
Patch Set: Removing verification of lock success callback cause it was a bud Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 // Ensure the RenderView doesn't point to this object, once it is destroyed. 1187 // Ensure the RenderView doesn't point to this object, once it is destroyed.
1188 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_| 1188 // TODO(nasko): Add a check that the |main_render_frame_| of |render_view_|
1189 // is |this|, once the object is no longer leaked. 1189 // is |this|, once the object is no longer leaked.
1190 // See https://crbug.com/464764. 1190 // See https://crbug.com/464764.
1191 render_view_->main_render_frame_ = nullptr; 1191 render_view_->main_render_frame_ = nullptr;
1192 } 1192 }
1193 1193
1194 render_view_->UnregisterRenderFrame(this); 1194 render_view_->UnregisterRenderFrame(this);
1195 g_routing_id_frame_map.Get().erase(routing_id_); 1195 g_routing_id_frame_map.Get().erase(routing_id_);
1196 RenderThread::Get()->RemoveRoute(routing_id_); 1196 RenderThread::Get()->RemoveRoute(routing_id_);
1197
1198 if (screen_orientation_dispatcher_) {
1199 delete screen_orientation_dispatcher_;
1200 screen_orientation_dispatcher_ = nullptr;
1201 }
1197 } 1202 }
1198 1203
1199 void RenderFrameImpl::BindToWebFrame(blink::WebLocalFrame* web_frame) { 1204 void RenderFrameImpl::BindToWebFrame(blink::WebLocalFrame* web_frame) {
1200 DCHECK(!frame_); 1205 DCHECK(!frame_);
1201 1206
1202 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert( 1207 std::pair<FrameMap::iterator, bool> result = g_frame_map.Get().insert(
1203 std::make_pair(web_frame, this)); 1208 std::make_pair(web_frame, this));
1204 CHECK(result.second) << "Inserting a duplicate item."; 1209 CHECK(result.second) << "Inserting a duplicate item.";
1205 1210
1206 frame_ = web_frame; 1211 frame_ = web_frame;
(...skipping 5421 matching lines...) Expand 10 before | Expand all | Expand 10 after
6628 // event target. Potentially a Pepper plugin will receive the event. 6633 // event target. Potentially a Pepper plugin will receive the event.
6629 // In order to tell whether a plugin gets the last mouse event and which it 6634 // In order to tell whether a plugin gets the last mouse event and which it
6630 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6635 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6631 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6636 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6632 // |pepper_last_mouse_event_target_|. 6637 // |pepper_last_mouse_event_target_|.
6633 pepper_last_mouse_event_target_ = nullptr; 6638 pepper_last_mouse_event_target_ = nullptr;
6634 #endif 6639 #endif
6635 } 6640 }
6636 6641
6637 } // namespace content 6642 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698