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 "content/shell/browser/shell.h" | 5 #include "content/shell/browser/shell.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/browser/web_contents_view.h" | 10 #include "content/public/browser/web_contents_view.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 ShellViewsDelegateAura() : use_transparent_windows_(false) { | 49 ShellViewsDelegateAura() : use_transparent_windows_(false) { |
50 } | 50 } |
51 | 51 |
52 virtual ~ShellViewsDelegateAura() { | 52 virtual ~ShellViewsDelegateAura() { |
53 } | 53 } |
54 | 54 |
55 void SetUseTransparentWindows(bool transparent) { | 55 void SetUseTransparentWindows(bool transparent) { |
56 use_transparent_windows_ = transparent; | 56 use_transparent_windows_ = transparent; |
57 } | 57 } |
58 | 58 |
59 // Overridden from views::TestViewsDelegate: | |
60 virtual bool UseTransparentWindows() const OVERRIDE { | |
61 return use_transparent_windows_; | |
62 } | |
63 | |
64 private: | 59 private: |
65 bool use_transparent_windows_; | 60 bool use_transparent_windows_; |
66 | 61 |
67 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegateAura); | 62 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegateAura); |
68 }; | 63 }; |
69 | 64 |
70 // Maintain the UI controls and web view for content shell | 65 // Maintain the UI controls and web view for content shell |
71 class ShellWindowDelegateView : public views::WidgetDelegateView, | 66 class ShellWindowDelegateView : public views::WidgetDelegateView, |
72 public views::TextfieldController, | 67 public views::TextfieldController, |
73 public views::ButtonListener { | 68 public views::ButtonListener { |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 384 } |
390 | 385 |
391 void Shell::PlatformSetTitle(const base::string16& title) { | 386 void Shell::PlatformSetTitle(const base::string16& title) { |
392 ShellWindowDelegateView* delegate_view = | 387 ShellWindowDelegateView* delegate_view = |
393 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); | 388 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); |
394 delegate_view->SetWindowTitle(title); | 389 delegate_view->SetWindowTitle(title); |
395 window_widget_->UpdateWindowTitle(); | 390 window_widget_->UpdateWindowTitle(); |
396 } | 391 } |
397 | 392 |
398 } // namespace content | 393 } // namespace content |
OLD | NEW |