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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 years, 9 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 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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 int g_next_javascript_callback_id = 1; 142 int g_next_javascript_callback_id = 1;
143 143
144 // Whether to allow injecting javascript into any kind of frame (for Android 144 // Whether to allow injecting javascript into any kind of frame (for Android
145 // WebView). 145 // WebView).
146 bool g_allow_injecting_javascript = false; 146 bool g_allow_injecting_javascript = false;
147 147
148 // The (process id, routing id) pair that identifies one RenderFrame. 148 // The (process id, routing id) pair that identifies one RenderFrame.
149 typedef std::pair<int32_t, int32_t> RenderFrameHostID; 149 typedef std::pair<int32_t, int32_t> RenderFrameHostID;
150 typedef base::hash_map<RenderFrameHostID, RenderFrameHostImpl*> 150 typedef base::hash_map<RenderFrameHostID, RenderFrameHostImpl*>
151 RoutingIDFrameMap; 151 RoutingIDFrameMap;
152 base::LazyInstance<RoutingIDFrameMap> g_routing_id_frame_map = 152 base::LazyInstance<RoutingIDFrameMap>::DestructorAtExit g_routing_id_frame_map =
153 LAZY_INSTANCE_INITIALIZER; 153 LAZY_INSTANCE_INITIALIZER;
154 154
155 // Translate a WebKit text direction into a base::i18n one. 155 // Translate a WebKit text direction into a base::i18n one.
156 base::i18n::TextDirection WebTextDirectionToChromeTextDirection( 156 base::i18n::TextDirection WebTextDirectionToChromeTextDirection(
157 blink::WebTextDirection dir) { 157 blink::WebTextDirection dir) {
158 switch (dir) { 158 switch (dir) {
159 case blink::WebTextDirectionLeftToRight: 159 case blink::WebTextDirectionLeftToRight:
160 return base::i18n::LEFT_TO_RIGHT; 160 return base::i18n::LEFT_TO_RIGHT;
161 case blink::WebTextDirectionRightToLeft: 161 case blink::WebTextDirectionRightToLeft:
162 return base::i18n::RIGHT_TO_LEFT; 162 return base::i18n::RIGHT_TO_LEFT;
(...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after
3461 // There is no pending NavigationEntry in these cases, so pass 0 as the 3461 // There is no pending NavigationEntry in these cases, so pass 0 as the
3462 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3462 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3463 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3463 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3464 return NavigationHandleImpl::Create( 3464 return NavigationHandleImpl::Create(
3465 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3465 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3466 params.was_within_same_page, base::TimeTicks::Now(), 3466 params.was_within_same_page, base::TimeTicks::Now(),
3467 entry_id_for_data_nav, false); // started_from_context_menu 3467 entry_id_for_data_nav, false); // started_from_context_menu
3468 } 3468 }
3469 3469
3470 } // namespace content 3470 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698