| 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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #include "net/base/filename_util.h" | 78 #include "net/base/filename_util.h" |
| 79 #include "net/base/url_util.h" | 79 #include "net/base/url_util.h" |
| 80 #include "net/url_request/url_request_context_getter.h" | 80 #include "net/url_request/url_request_context_getter.h" |
| 81 #include "storage/browser/fileapi/isolated_context.h" | 81 #include "storage/browser/fileapi/isolated_context.h" |
| 82 #include "third_party/skia/include/core/SkBitmap.h" | 82 #include "third_party/skia/include/core/SkBitmap.h" |
| 83 #include "ui/base/clipboard/clipboard.h" | 83 #include "ui/base/clipboard/clipboard.h" |
| 84 #include "ui/base/touch/touch_device.h" | 84 #include "ui/base/touch/touch_device.h" |
| 85 #include "ui/base/touch/touch_enabled.h" | 85 #include "ui/base/touch/touch_enabled.h" |
| 86 #include "ui/base/ui_base_switches.h" | 86 #include "ui/base/ui_base_switches.h" |
| 87 #include "ui/gfx/animation/animation.h" | 87 #include "ui/gfx/animation/animation.h" |
| 88 #include "ui/gfx/color_profile.h" |
| 88 #include "ui/gfx/image/image_skia.h" | 89 #include "ui/gfx/image/image_skia.h" |
| 89 #include "ui/gfx/native_widget_types.h" | 90 #include "ui/gfx/native_widget_types.h" |
| 90 #include "ui/native_theme/native_theme_switches.h" | 91 #include "ui/native_theme/native_theme_switches.h" |
| 91 #include "url/url_constants.h" | 92 #include "url/url_constants.h" |
| 92 | 93 |
| 93 #if defined(OS_WIN) | 94 #if defined(OS_WIN) |
| 94 #include "ui/display/win/dpi.h" | 95 #include "ui/display/win/dpi.h" |
| 95 #include "ui/gfx/geometry/dip_util.h" | 96 #include "ui/gfx/geometry/dip_util.h" |
| 96 #include "ui/gfx/platform_font_win.h" | 97 #include "ui/gfx/platform_font_win.h" |
| 97 #endif | 98 #endif |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 params.replicated_frame_state = replicated_frame_state; | 361 params.replicated_frame_state = replicated_frame_state; |
| 361 params.proxy_routing_id = proxy_route_id; | 362 params.proxy_routing_id = proxy_route_id; |
| 362 params.hidden = GetWidget()->is_hidden(); | 363 params.hidden = GetWidget()->is_hidden(); |
| 363 params.never_visible = delegate_->IsNeverVisible(); | 364 params.never_visible = delegate_->IsNeverVisible(); |
| 364 params.window_was_created_with_opener = window_was_created_with_opener; | 365 params.window_was_created_with_opener = window_was_created_with_opener; |
| 365 params.next_page_id = next_page_id; | 366 params.next_page_id = next_page_id; |
| 366 params.enable_auto_resize = GetWidget()->auto_resize_enabled(); | 367 params.enable_auto_resize = GetWidget()->auto_resize_enabled(); |
| 367 params.min_size = GetWidget()->min_size_for_auto_resize(); | 368 params.min_size = GetWidget()->min_size_for_auto_resize(); |
| 368 params.max_size = GetWidget()->max_size_for_auto_resize(); | 369 params.max_size = GetWidget()->max_size_for_auto_resize(); |
| 369 params.page_zoom_level = delegate_->GetPendingPageZoomLevel(); | 370 params.page_zoom_level = delegate_->GetPendingPageZoomLevel(); |
| 371 params.image_decode_color_profile = |
| 372 gfx::ColorProfile::GetFromBestMonitor().profile(); |
| 370 GetWidget()->GetResizeParams(¶ms.initial_size); | 373 GetWidget()->GetResizeParams(¶ms.initial_size); |
| 371 | 374 |
| 372 if (!Send(new ViewMsg_New(params))) | 375 if (!Send(new ViewMsg_New(params))) |
| 373 return false; | 376 return false; |
| 374 GetWidget()->SetInitialRenderSizeParams(params.initial_size); | 377 GetWidget()->SetInitialRenderSizeParams(params.initial_size); |
| 375 | 378 |
| 376 // If the RWHV has not yet been set, the surface ID namespace will get | 379 // If the RWHV has not yet been set, the surface ID namespace will get |
| 377 // passed down by the call to SetView(). | 380 // passed down by the call to SetView(). |
| 378 if (GetWidget()->GetView()) { | 381 if (GetWidget()->GetView()) { |
| 379 Send(new ViewMsg_SetSurfaceIdNamespace( | 382 Send(new ViewMsg_SetSurfaceIdNamespace( |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 // Note: We are using the origin URL provided by the sender here. It may be | 1327 // Note: We are using the origin URL provided by the sender here. It may be |
| 1325 // different from the receiver's. | 1328 // different from the receiver's. |
| 1326 file_system_file.url = | 1329 file_system_file.url = |
| 1327 GURL(storage::GetIsolatedFileSystemRootURIString( | 1330 GURL(storage::GetIsolatedFileSystemRootURIString( |
| 1328 file_system_url.origin(), filesystem_id, std::string()) | 1331 file_system_url.origin(), filesystem_id, std::string()) |
| 1329 .append(register_name)); | 1332 .append(register_name)); |
| 1330 } | 1333 } |
| 1331 } | 1334 } |
| 1332 | 1335 |
| 1333 } // namespace content | 1336 } // namespace content |
| OLD | NEW |