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

Side by Side Diff: content/browser/renderer_host/render_view_host_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/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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "content/public/browser/native_web_keyboard_event.h" 45 #include "content/public/browser/native_web_keyboard_event.h"
46 #include "content/public/browser/notification_details.h" 46 #include "content/public/browser/notification_details.h"
47 #include "content/public/browser/notification_service.h" 47 #include "content/public/browser/notification_service.h"
48 #include "content/public/browser/notification_types.h" 48 #include "content/public/browser/notification_types.h"
49 #include "content/public/browser/render_view_host_observer.h" 49 #include "content/public/browser/render_view_host_observer.h"
50 #include "content/public/browser/user_metrics.h" 50 #include "content/public/browser/user_metrics.h"
51 #include "content/public/common/bindings_policy.h" 51 #include "content/public/common/bindings_policy.h"
52 #include "content/public/common/content_constants.h" 52 #include "content/public/common/content_constants.h"
53 #include "content/public/common/content_switches.h" 53 #include "content/public/common/content_switches.h"
54 #include "content/public/common/context_menu_params.h" 54 #include "content/public/common/context_menu_params.h"
55 #include "content/public/common/draggable_region.h"
55 #include "content/public/common/result_codes.h" 56 #include "content/public/common/result_codes.h"
56 #include "content/public/common/url_constants.h" 57 #include "content/public/common/url_constants.h"
57 #include "net/base/net_util.h" 58 #include "net/base/net_util.h"
58 #include "net/url_request/url_request_context_getter.h" 59 #include "net/url_request/url_request_context_getter.h"
59 #include "third_party/skia/include/core/SkBitmap.h" 60 #include "third_party/skia/include/core/SkBitmap.h"
60 #include "ui/base/dialogs/selected_file_info.h" 61 #include "ui/base/dialogs/selected_file_info.h"
61 #include "ui/gfx/image/image_skia.h" 62 #include "ui/gfx/image/image_skia.h"
62 #include "ui/gfx/native_widget_types.h" 63 #include "ui/gfx/native_widget_types.h"
63 #include "webkit/fileapi/isolated_context.h" 64 #include "webkit/fileapi/isolated_context.h"
64 #include "webkit/glue/webdropdata.h" 65 #include "webkit/glue/webdropdata.h"
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 945 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
945 OnCancelDesktopNotification) 946 OnCancelDesktopNotification)
946 #if defined(OS_MACOSX) 947 #if defined(OS_MACOSX)
947 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) 948 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup)
948 #endif 949 #endif
949 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 950 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
950 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse, 951 IPC_MESSAGE_HANDLER(ViewHostMsg_DomOperationResponse,
951 OnDomOperationResponse) 952 OnDomOperationResponse)
952 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Notifications, 953 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_Notifications,
953 OnAccessibilityNotifications) 954 OnAccessibilityNotifications)
955 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateDraggableRegions,
956 OnUpdateDraggableRegions)
954 // Have the super handle all other messages. 957 // Have the super handle all other messages.
955 IPC_MESSAGE_UNHANDLED( 958 IPC_MESSAGE_UNHANDLED(
956 handled = RenderWidgetHostImpl::OnMessageReceived(msg)) 959 handled = RenderWidgetHostImpl::OnMessageReceived(msg))
957 IPC_END_MESSAGE_MAP_EX() 960 IPC_END_MESSAGE_MAP_EX()
958 961
959 if (!msg_is_ok) { 962 if (!msg_is_ok) {
960 // The message had a handler, but its de-serialization failed. 963 // The message had a handler, but its de-serialization failed.
961 // Kill the renderer. 964 // Kill the renderer.
962 content::RecordAction(UserMetricsAction("BadMessageTerminate_RVH")); 965 content::RecordAction(UserMetricsAction("BadMessageTerminate_RVH"));
963 GetProcess()->ReceivedBadMessage(); 966 GetProcess()->ReceivedBadMessage();
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1870 1873
1871 void RenderViewHostImpl::OnDomOperationResponse( 1874 void RenderViewHostImpl::OnDomOperationResponse(
1872 const std::string& json_string, int automation_id) { 1875 const std::string& json_string, int automation_id) {
1873 DomOperationNotificationDetails details(json_string, automation_id); 1876 DomOperationNotificationDetails details(json_string, automation_id);
1874 content::NotificationService::current()->Notify( 1877 content::NotificationService::current()->Notify(
1875 content::NOTIFICATION_DOM_OPERATION_RESPONSE, 1878 content::NOTIFICATION_DOM_OPERATION_RESPONSE,
1876 content::Source<RenderViewHost>(this), 1879 content::Source<RenderViewHost>(this),
1877 content::Details<DomOperationNotificationDetails>(&details)); 1880 content::Details<DomOperationNotificationDetails>(&details));
1878 } 1881 }
1879 1882
1883 void RenderViewHostImpl::OnUpdateDraggableRegions(
1884 const std::vector<content::DraggableRegion>& regions) {
1885 delegate_->UpdateDraggableRegions(regions);
1886 }
1887
1880 void RenderViewHostImpl::SetSwappedOut(bool is_swapped_out) { 1888 void RenderViewHostImpl::SetSwappedOut(bool is_swapped_out) {
1881 is_swapped_out_ = is_swapped_out; 1889 is_swapped_out_ = is_swapped_out;
1882 1890
1883 // Whenever we change swap out state, we should not be waiting for 1891 // Whenever we change swap out state, we should not be waiting for
1884 // beforeunload or unload acks. We clear them here to be safe, since they 1892 // beforeunload or unload acks. We clear them here to be safe, since they
1885 // can cause navigations to be ignored in OnMsgNavigate. 1893 // can cause navigations to be ignored in OnMsgNavigate.
1886 is_waiting_for_beforeunload_ack_ = false; 1894 is_waiting_for_beforeunload_ack_ = false;
1887 is_waiting_for_unload_ack_ = false; 1895 is_waiting_for_unload_ack_ = false;
1888 } 1896 }
1889 1897
1890 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1898 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1891 STLDeleteValues(&power_save_blockers_); 1899 STLDeleteValues(&power_save_blockers_);
1892 } 1900 }
1893 1901
1894 } // namespace content 1902 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698