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 "chrome/browser/ui/extensions/shell_window.h" | 5 #include "chrome/browser/ui/extensions/shell_window.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/extensions/app_window_contents.h" | 9 #include "chrome/browser/extensions/app_window_contents.h" |
10 #include "chrome/browser/extensions/extension_process_manager.h" | 10 #include "chrome/browser/extensions/extension_process_manager.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 ShellWindowContents* shell_window_contents, | 102 ShellWindowContents* shell_window_contents, |
103 const ShellWindow::CreateParams& params) { | 103 const ShellWindow::CreateParams& params) { |
104 // Initialize the render interface and web contents | 104 // Initialize the render interface and web contents |
105 shell_window_contents_.reset(shell_window_contents); | 105 shell_window_contents_.reset(shell_window_contents); |
106 shell_window_contents_->Initialize(profile(), url); | 106 shell_window_contents_->Initialize(profile(), url); |
107 WebContents* web_contents = shell_window_contents_->GetWebContents(); | 107 WebContents* web_contents = shell_window_contents_->GetWebContents(); |
108 WebContentsModalDialogManager::CreateForWebContents(web_contents); | 108 WebContentsModalDialogManager::CreateForWebContents(web_contents); |
109 FaviconTabHelper::CreateForWebContents(web_contents); | 109 FaviconTabHelper::CreateForWebContents(web_contents); |
110 | 110 |
111 web_contents->SetDelegate(this); | 111 web_contents->SetDelegate(this); |
112 chrome::SetViewType(web_contents, chrome::VIEW_TYPE_APP_SHELL); | 112 chrome::SetViewType(web_contents, extensions::VIEW_TYPE_APP_SHELL); |
113 | 113 |
114 // Initialize the window | 114 // Initialize the window |
115 window_type_ = params.window_type; | 115 window_type_ = params.window_type; |
116 | 116 |
117 gfx::Rect bounds = params.bounds; | 117 gfx::Rect bounds = params.bounds; |
118 | 118 |
119 if (bounds.width() == 0) | 119 if (bounds.width() == 0) |
120 bounds.set_width(kDefaultWidth); | 120 bounds.set_width(kDefaultWidth); |
121 if (bounds.height() == 0) | 121 if (bounds.height() == 0) |
122 bounds.set_height(kDefaultHeight); | 122 bounds.set_height(kDefaultHeight); |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 const extensions::DraggableRegion& region = *iter; | 532 const extensions::DraggableRegion& region = *iter; |
533 sk_region->op( | 533 sk_region->op( |
534 region.bounds.x(), | 534 region.bounds.x(), |
535 region.bounds.y(), | 535 region.bounds.y(), |
536 region.bounds.right(), | 536 region.bounds.right(), |
537 region.bounds.bottom(), | 537 region.bounds.bottom(), |
538 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 538 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
539 } | 539 } |
540 return sk_region; | 540 return sk_region; |
541 } | 541 } |
OLD | NEW |