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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10822004: Draggable region support for frameless app window on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 #include "content/public/browser/resource_request_details.h" 55 #include "content/public/browser/resource_request_details.h"
56 #include "content/public/browser/user_metrics.h" 56 #include "content/public/browser/user_metrics.h"
57 #include "content/public/browser/web_contents_delegate.h" 57 #include "content/public/browser/web_contents_delegate.h"
58 #include "content/public/browser/web_contents_observer.h" 58 #include "content/public/browser/web_contents_observer.h"
59 #include "content/public/browser/web_contents_view.h" 59 #include "content/public/browser/web_contents_view.h"
60 #include "content/public/browser/web_ui_controller_factory.h" 60 #include "content/public/browser/web_ui_controller_factory.h"
61 #include "content/public/common/bindings_policy.h" 61 #include "content/public/common/bindings_policy.h"
62 #include "content/public/common/content_constants.h" 62 #include "content/public/common/content_constants.h"
63 #include "content/public/common/content_restriction.h" 63 #include "content/public/common/content_restriction.h"
64 #include "content/public/common/content_switches.h" 64 #include "content/public/common/content_switches.h"
65 #include "content/public/common/draggable_region.h"
65 #include "content/public/common/url_constants.h" 66 #include "content/public/common/url_constants.h"
66 #include "net/base/mime_util.h" 67 #include "net/base/mime_util.h"
67 #include "net/base/net_util.h" 68 #include "net/base/net_util.h"
68 #include "net/base/network_change_notifier.h" 69 #include "net/base/network_change_notifier.h"
69 #include "net/url_request/url_request_context_getter.h" 70 #include "net/url_request/url_request_context_getter.h"
70 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h" 71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositor.h"
71 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 72 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
72 #include "ui/base/layout.h" 73 #include "ui/base/layout.h"
73 #include "ui/base/ui_base_switches.h" 74 #include "ui/base/ui_base_switches.h"
74 #include "ui/gfx/display.h" 75 #include "ui/gfx/display.h"
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 1361
1361 void WebContentsImpl::RequestMediaAccessPermission( 1362 void WebContentsImpl::RequestMediaAccessPermission(
1362 const content::MediaStreamRequest* request, 1363 const content::MediaStreamRequest* request,
1363 const content::MediaResponseCallback& callback) { 1364 const content::MediaResponseCallback& callback) {
1364 if (delegate_) 1365 if (delegate_)
1365 delegate_->RequestMediaAccessPermission(this, request, callback); 1366 delegate_->RequestMediaAccessPermission(this, request, callback);
1366 else 1367 else
1367 callback.Run(content::MediaStreamDevices()); 1368 callback.Run(content::MediaStreamDevices());
1368 } 1369 }
1369 1370
1371 void WebContentsImpl::UpdateDraggableRegions(
1372 const std::vector<content::DraggableRegion>& regions) {
1373 if (delegate_)
1374 delegate_->UpdateDraggableRegions(regions);
1375 }
1376
1370 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) { 1377 void WebContentsImpl::UpdatePreferredSize(const gfx::Size& pref_size) {
1371 preferred_size_ = pref_size; 1378 preferred_size_ = pref_size;
1372 if (delegate_) 1379 if (delegate_)
1373 delegate_->UpdatePreferredSize(this, pref_size); 1380 delegate_->UpdatePreferredSize(this, pref_size);
1374 } 1381 }
1375 1382
1376 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) { 1383 void WebContentsImpl::ResizeDueToAutoResize(const gfx::Size& new_size) {
1377 if (delegate_) 1384 if (delegate_)
1378 delegate_->ResizeDueToAutoResize(this, new_size); 1385 delegate_->ResizeDueToAutoResize(this, new_size);
1379 } 1386 }
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 browser_plugin_host()->embedder_render_process_host(); 3149 browser_plugin_host()->embedder_render_process_host();
3143 *embedder_container_id = browser_plugin_host()->instance_id(); 3150 *embedder_container_id = browser_plugin_host()->instance_id();
3144 int embedder_process_id = 3151 int embedder_process_id =
3145 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; 3152 embedder_render_process_host ? embedder_render_process_host->GetID() : -1;
3146 if (embedder_process_id != -1) { 3153 if (embedder_process_id != -1) {
3147 *embedder_channel_name = 3154 *embedder_channel_name =
3148 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), 3155 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(),
3149 embedder_process_id); 3156 embedder_process_id);
3150 } 3157 }
3151 } 3158 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698