| 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 "apps/shell_window.h" | 5 #include "apps/shell_window.h" |
| 6 | 6 |
| 7 #include "apps/shell_window_geometry_cache.h" | 7 #include "apps/shell_window_geometry_cache.h" |
| 8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
| 9 #include "apps/ui/native_app_window.h" | 9 #include "apps/ui/native_app_window.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 : profile_(profile), | 139 : profile_(profile), |
| 140 extension_(extension), | 140 extension_(extension), |
| 141 extension_id_(extension->id()), | 141 extension_id_(extension->id()), |
| 142 window_type_(WINDOW_TYPE_DEFAULT), | 142 window_type_(WINDOW_TYPE_DEFAULT), |
| 143 delegate_(delegate), | 143 delegate_(delegate), |
| 144 image_loader_ptr_factory_(this), | 144 image_loader_ptr_factory_(this), |
| 145 fullscreen_types_(FULLSCREEN_TYPE_NONE), | 145 fullscreen_types_(FULLSCREEN_TYPE_NONE), |
| 146 show_on_first_paint_(false), | 146 show_on_first_paint_(false), |
| 147 first_paint_complete_(false), | 147 first_paint_complete_(false), |
| 148 cached_always_on_top_(false) { | 148 cached_always_on_top_(false) { |
| 149 CHECK(!profile->IsGuestSession() || profile->IsOffTheRecord()) |
| 150 << "Only off the record window may be opened in the guest mode."; |
| 149 } | 151 } |
| 150 | 152 |
| 151 void ShellWindow::Init(const GURL& url, | 153 void ShellWindow::Init(const GURL& url, |
| 152 ShellWindowContents* shell_window_contents, | 154 ShellWindowContents* shell_window_contents, |
| 153 const CreateParams& params) { | 155 const CreateParams& params) { |
| 154 // Initialize the render interface and web contents | 156 // Initialize the render interface and web contents |
| 155 shell_window_contents_.reset(shell_window_contents); | 157 shell_window_contents_.reset(shell_window_contents); |
| 156 shell_window_contents_->Initialize(profile(), url); | 158 shell_window_contents_->Initialize(profile(), url); |
| 157 WebContents* web_contents = shell_window_contents_->GetWebContents(); | 159 WebContents* web_contents = shell_window_contents_->GetWebContents(); |
| 158 if (CommandLine::ForCurrentProcess()->HasSwitch( | 160 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| (...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 region.bounds.x(), | 842 region.bounds.x(), |
| 841 region.bounds.y(), | 843 region.bounds.y(), |
| 842 region.bounds.right(), | 844 region.bounds.right(), |
| 843 region.bounds.bottom(), | 845 region.bounds.bottom(), |
| 844 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 846 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
| 845 } | 847 } |
| 846 return sk_region; | 848 return sk_region; |
| 847 } | 849 } |
| 848 | 850 |
| 849 } // namespace apps | 851 } // namespace apps |
| OLD | NEW |