Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: chrome/browser/chromeos/login/simple_web_view_dialog.cc

Issue 14969012: components: Create web_modal component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-before-land Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/chromeos/login/simple_web_view_dialog.h" 5 #include "chrome/browser/chromeos/login/simple_web_view_dialog.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" 12 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
13 #include "chrome/browser/command_updater.h" 13 #include "chrome/browser/command_updater.h"
14 #include "chrome/browser/password_manager/password_manager.h" 14 #include "chrome/browser/password_manager/password_manager.h"
15 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" 15 #include "chrome/browser/password_manager/password_manager_delegate_impl.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delega te.h" 18 #include "chrome/browser/ui/content_settings/content_setting_bubble_model_delega te.h"
19 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h" 19 #include "chrome/browser/ui/toolbar/toolbar_model_impl.h"
20 #include "chrome/browser/ui/view_ids.h" 20 #include "chrome/browser/ui/view_ids.h"
21 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 21 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
22 #include "chrome/browser/ui/views/reload_button.h" 22 #include "chrome/browser/ui/views/reload_button.h"
23 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" 23 #include "components/web_modal/web_contents_modal_dialog_manager.h"
24 #include "content/public/browser/navigation_controller.h" 24 #include "content/public/browser/navigation_controller.h"
25 #include "content/public/browser/navigation_entry.h" 25 #include "content/public/browser/navigation_entry.h"
26 #include "content/public/browser/web_contents.h" 26 #include "content/public/browser/web_contents.h"
27 #include "grit/generated_resources.h" 27 #include "grit/generated_resources.h"
28 #include "grit/theme_resources.h" 28 #include "grit/theme_resources.h"
29 #include "ipc/ipc_message.h" 29 #include "ipc/ipc_message.h"
30 #include "ui/base/l10n/l10n_util.h" 30 #include "ui/base/l10n/l10n_util.h"
31 #include "ui/base/theme_provider.h" 31 #include "ui/base/theme_provider.h"
32 #include "ui/views/background.h" 32 #include "ui/views/background.h"
33 #include "ui/views/controls/webview/webview.h" 33 #include "ui/views/controls/webview/webview.h"
34 #include "ui/views/layout/grid_layout.h" 34 #include "ui/views/layout/grid_layout.h"
35 #include "ui/views/layout/layout_constants.h" 35 #include "ui/views/layout/layout_constants.h"
36 #include "ui/views/view.h" 36 #include "ui/views/view.h"
37 #include "ui/views/widget/widget.h" 37 #include "ui/views/widget/widget.h"
38 38
39 using content::WebContents; 39 using content::WebContents;
40 using views::GridLayout; 40 using views::GridLayout;
41 using web_modal::WebContentsModalDialogManager;
41 42
42 namespace { 43 namespace {
43 44
44 const int kLocationBarHeight = 35; 45 const int kLocationBarHeight = 35;
45 // Margin between screen edge and SimpleWebViewDialog border. 46 // Margin between screen edge and SimpleWebViewDialog border.
46 const int kExternalMargin = 50; 47 const int kExternalMargin = 50;
47 // Margin between WebView and SimpleWebViewDialog border. 48 // Margin between WebView and SimpleWebViewDialog border.
48 const int kInnerMargin = 2; 49 const int kInnerMargin = 2;
49 50
50 class ToolbarRowView : public views::View { 51 class ToolbarRowView : public views::View {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 380
380 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) { 381 void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
381 if (reload_) { 382 if (reload_) {
382 reload_->ChangeMode( 383 reload_->ChangeMode(
383 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD, 384 is_loading ? ReloadButton::MODE_STOP : ReloadButton::MODE_RELOAD,
384 force); 385 force);
385 } 386 }
386 } 387 }
387 388
388 } // namespace chromeos 389 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/chromeos/login/webui_login_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698