| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/tab_contents/render_view_host_delegate_helper.h" | 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 RenderWidgetHostView::CreateViewForWidget(widget_host); | 122 RenderWidgetHostView::CreateViewForWidget(widget_host); |
| 123 // Popups should not get activated. | 123 // Popups should not get activated. |
| 124 widget_view->set_popup_type(popup_type); | 124 widget_view->set_popup_type(popup_type); |
| 125 // Save the created widget associated with the route so we can show it later. | 125 // Save the created widget associated with the route so we can show it later. |
| 126 pending_widget_views_[route_id] = widget_view; | 126 pending_widget_views_[route_id] = widget_view; |
| 127 return widget_view; | 127 return widget_view; |
| 128 } | 128 } |
| 129 | 129 |
| 130 RenderWidgetHostView* | 130 RenderWidgetHostView* |
| 131 RenderViewHostDelegateViewHelper::CreateNewFullscreenWidget( | 131 RenderViewHostDelegateViewHelper::CreateNewFullscreenWidget( |
| 132 int route_id, WebKit::WebPopupType popup_type, RenderProcessHost* process) { | 132 int route_id, RenderProcessHost* process) { |
| 133 RenderWidgetFullscreenHost* fullscreen_widget_host = | 133 RenderWidgetFullscreenHost* fullscreen_widget_host = |
| 134 new RenderWidgetFullscreenHost(process, route_id); | 134 new RenderWidgetFullscreenHost(process, route_id); |
| 135 RenderWidgetHostView* widget_view = | 135 RenderWidgetHostView* widget_view = |
| 136 RenderWidgetHostView::CreateViewForWidget(fullscreen_widget_host); | 136 RenderWidgetHostView::CreateViewForWidget(fullscreen_widget_host); |
| 137 widget_view->set_popup_type(popup_type); | |
| 138 pending_widget_views_[route_id] = widget_view; | 137 pending_widget_views_[route_id] = widget_view; |
| 139 return widget_view; | 138 return widget_view; |
| 140 } | 139 } |
| 141 | 140 |
| 142 TabContents* RenderViewHostDelegateViewHelper::GetCreatedWindow(int route_id) { | 141 TabContents* RenderViewHostDelegateViewHelper::GetCreatedWindow(int route_id) { |
| 143 PendingContents::iterator iter = pending_contents_.find(route_id); | 142 PendingContents::iterator iter = pending_contents_.find(route_id); |
| 144 if (iter == pending_contents_.end()) { | 143 if (iter == pending_contents_.end()) { |
| 145 DCHECK(false); | 144 DCHECK(false); |
| 146 return NULL; | 145 return NULL; |
| 147 } | 146 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 inspector_settings->SetWithoutPathExpansion(key, | 344 inspector_settings->SetWithoutPathExpansion(key, |
| 346 Value::CreateStringValue(value)); | 345 Value::CreateStringValue(value)); |
| 347 } | 346 } |
| 348 | 347 |
| 349 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { | 348 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { |
| 350 DictionaryValue* inspector_settings = | 349 DictionaryValue* inspector_settings = |
| 351 profile->GetPrefs()->GetMutableDictionary( | 350 profile->GetPrefs()->GetMutableDictionary( |
| 352 prefs::kWebKitInspectorSettings); | 351 prefs::kWebKitInspectorSettings); |
| 353 inspector_settings->Clear(); | 352 inspector_settings->Clear(); |
| 354 } | 353 } |
| OLD | NEW |