| OLD | NEW |
| 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 "chrome/browser/extensions/app_window_contents.h" | 5 #include "chrome/browser/extensions/app_window_contents.h" |
| 6 | 6 |
| 7 #include "chrome/browser/printing/print_preview_message_handler.h" | 7 #include "chrome/browser/printing/print_preview_message_handler.h" |
| 8 #include "chrome/browser/printing/print_view_manager.h" | 8 #include "chrome/browser/printing/print_view_manager.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/extensions/native_app_window.h" | 10 #include "chrome/browser/ui/extensions/native_app_window.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 content::Source<content::NavigationController>( | 77 content::Source<content::NavigationController>( |
| 78 &web_contents()->GetController())); | 78 &web_contents()->GetController())); |
| 79 web_contents_->GetController().LoadURL( | 79 web_contents_->GetController().LoadURL( |
| 80 url_, content::Referrer(), content::PAGE_TRANSITION_LINK, | 80 url_, content::Referrer(), content::PAGE_TRANSITION_LINK, |
| 81 std::string()); | 81 std::string()); |
| 82 registrar_.RemoveAll(); | 82 registrar_.RemoveAll(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void AppWindowContents::NativeWindowChanged( | 85 void AppWindowContents::NativeWindowChanged( |
| 86 NativeAppWindow* native_app_window) { | 86 NativeAppWindow* native_app_window) { |
| 87 ListValue args; | 87 base::ListValue args; |
| 88 DictionaryValue* dictionary = new DictionaryValue(); | 88 DictionaryValue* dictionary = new DictionaryValue(); |
| 89 args.Append(dictionary); | 89 args.Append(dictionary); |
| 90 | 90 |
| 91 gfx::Rect bounds = host_->GetClientBounds(); | 91 gfx::Rect bounds = host_->GetClientBounds(); |
| 92 app_window::Bounds update; | 92 app_window::Bounds update; |
| 93 update.left.reset(new int(bounds.x())); | 93 update.left.reset(new int(bounds.x())); |
| 94 update.top.reset(new int(bounds.y())); | 94 update.top.reset(new int(bounds.y())); |
| 95 update.width.reset(new int(bounds.width())); | 95 update.width.reset(new int(bounds.width())); |
| 96 update.height.reset(new int(bounds.height())); | 96 update.height.reset(new int(bounds.height())); |
| 97 dictionary->Set("bounds", update.ToValue().release()); | 97 dictionary->Set("bounds", update.ToValue().release()); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 void AppWindowContents::SuspendRenderViewHost( | 173 void AppWindowContents::SuspendRenderViewHost( |
| 174 content::RenderViewHost* rvh) { | 174 content::RenderViewHost* rvh) { |
| 175 DCHECK(rvh); | 175 DCHECK(rvh); |
| 176 content::BrowserThread::PostTask( | 176 content::BrowserThread::PostTask( |
| 177 content::BrowserThread::IO, FROM_HERE, | 177 content::BrowserThread::IO, FROM_HERE, |
| 178 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, | 178 base::Bind(&content::ResourceDispatcherHost::BlockRequestsForRoute, |
| 179 base::Unretained(content::ResourceDispatcherHost::Get()), | 179 base::Unretained(content::ResourceDispatcherHost::Get()), |
| 180 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); | 180 rvh->GetProcess()->GetID(), rvh->GetRoutingID())); |
| 181 } | 181 } |
| OLD | NEW |