| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/app_window/app_window.h" | 5 #include "extensions/browser/app_window/app_window.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 WebContents* AppWindow::OpenURLFromTab(WebContents* source, | 367 WebContents* AppWindow::OpenURLFromTab(WebContents* source, |
| 368 const content::OpenURLParams& params) { | 368 const content::OpenURLParams& params) { |
| 369 DCHECK_EQ(web_contents(), source); | 369 DCHECK_EQ(web_contents(), source); |
| 370 return helper_->OpenURLFromTab(params); | 370 return helper_->OpenURLFromTab(params); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void AppWindow::AddNewContents(WebContents* source, | 373 void AppWindow::AddNewContents(WebContents* source, |
| 374 WebContents* new_contents, | 374 WebContents* new_contents, |
| 375 WindowOpenDisposition disposition, | 375 WindowOpenDisposition disposition, |
| 376 const gfx::Rect& initial_pos, | 376 const gfx::Rect& initial_rect, |
| 377 bool user_gesture, | 377 bool user_gesture, |
| 378 bool* was_blocked) { | 378 bool* was_blocked) { |
| 379 DCHECK(new_contents->GetBrowserContext() == browser_context_); | 379 DCHECK(new_contents->GetBrowserContext() == browser_context_); |
| 380 app_delegate_->AddNewContents(browser_context_, | 380 app_delegate_->AddNewContents(browser_context_, |
| 381 new_contents, | 381 new_contents, |
| 382 disposition, | 382 disposition, |
| 383 initial_pos, | 383 initial_rect, |
| 384 user_gesture, | 384 user_gesture, |
| 385 was_blocked); | 385 was_blocked); |
| 386 } | 386 } |
| 387 | 387 |
| 388 bool AppWindow::PreHandleKeyboardEvent( | 388 bool AppWindow::PreHandleKeyboardEvent( |
| 389 content::WebContents* source, | 389 content::WebContents* source, |
| 390 const content::NativeWebKeyboardEvent& event, | 390 const content::NativeWebKeyboardEvent& event, |
| 391 bool* is_keyboard_shortcut) { | 391 bool* is_keyboard_shortcut) { |
| 392 const Extension* extension = GetExtension(); | 392 const Extension* extension = GetExtension(); |
| 393 if (!extension) | 393 if (!extension) |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 region.bounds.x(), | 1109 region.bounds.x(), |
| 1110 region.bounds.y(), | 1110 region.bounds.y(), |
| 1111 region.bounds.right(), | 1111 region.bounds.right(), |
| 1112 region.bounds.bottom(), | 1112 region.bounds.bottom(), |
| 1113 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 1113 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 1114 } | 1114 } |
| 1115 return sk_region; | 1115 return sk_region; |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 } // namespace extensions | 1118 } // namespace extensions |
| OLD | NEW |