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/extension_process_manager.h" | 9 #include "chrome/browser/extensions/extension_process_manager.h" |
10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); | 345 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); |
346 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(), | 346 rvh->Send(new ExtensionMsg_MessageInvoke(rvh->GetRoutingID(), |
347 extension_->id(), | 347 extension_->id(), |
348 "updateAppWindowProperties", | 348 "updateAppWindowProperties", |
349 args, | 349 args, |
350 GURL(), | 350 GURL(), |
351 false)); | 351 false)); |
352 } | 352 } |
353 | 353 |
| 354 NativeAppWindow* ShellWindow::GetBaseWindow() { |
| 355 return native_app_window_.get(); |
| 356 } |
354 | 357 |
355 BaseWindow* ShellWindow::GetBaseWindow() { | 358 gfx::NativeWindow ShellWindow::GetNativeWindow() { |
356 return native_app_window_.get(); | 359 return GetBaseWindow()->GetNativeWindow(); |
357 } | 360 } |
358 | 361 |
359 string16 ShellWindow::GetTitle() const { | 362 string16 ShellWindow::GetTitle() const { |
360 // WebContents::GetTitle() will return the page's URL if there's no <title> | 363 // WebContents::GetTitle() will return the page's URL if there's no <title> |
361 // specified. However, we'd prefer to show the name of the extension in that | 364 // specified. However, we'd prefer to show the name of the extension in that |
362 // case, so we directly inspect the NavigationEntry's title. | 365 // case, so we directly inspect the NavigationEntry's title. |
363 if (!web_contents() || | 366 if (!web_contents() || |
364 !web_contents()->GetController().GetActiveEntry() || | 367 !web_contents()->GetController().GetActiveEntry() || |
365 web_contents()->GetController().GetActiveEntry()->GetTitle().empty()) | 368 web_contents()->GetController().GetActiveEntry()->GetTitle().empty()) |
366 return UTF8ToUTF16(extension()->name()); | 369 return UTF8ToUTF16(extension()->name()); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 const extensions::DraggableRegion& region = *iter; | 554 const extensions::DraggableRegion& region = *iter; |
552 sk_region->op( | 555 sk_region->op( |
553 region.bounds.x(), | 556 region.bounds.x(), |
554 region.bounds.y(), | 557 region.bounds.y(), |
555 region.bounds.right(), | 558 region.bounds.right(), |
556 region.bounds.bottom(), | 559 region.bounds.bottom(), |
557 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); | 560 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op); |
558 } | 561 } |
559 return sk_region; | 562 return sk_region; |
560 } | 563 } |
OLD | NEW |